In OpenSSL 3.0 is it possible to provide the private key for decryption as a string. I want to store the key inside some database and not as a file. Therefore i want to call OpenSSL with the key as a string not with the filepath.
I use windows and then run OpenSSL with the shell. The key is stored as in PEM format.
I now want to execute OpenSSL like in this bash script.
key="-----BEGIN RSA PRIVATE KEY-----
<key data>
-----END RSA PRIVATE KEY-----"
command="openssl rsautl -decrypt -inkey $key -in license.enc -keyform PEM"
eval $command
So far I couldn't get it running and on the RSA OpenSSL page i saw no such option. But maybe someone has some solution for this.