I have an encrypted .eml file and a private key. I've looked it up a lot on the internet but couldn't find a way to decrypt the email using OpenSSL. I've tried this command:
smime -decrypt -in encrypted.eml -inkey privatekey.key -out decrypted.eml
and each time I get this error:
OpenSSL> smime -decrypt -in encrypted.eml -inkey privatekey.key -out decrypted.eml
No recipient certificate or key specified
smime: Use -help for summary.
I have also tried converting the private key to a .pem file but it still displays the same message. both files are in the same folder as the openssl.exe application is, before that I couldn't get it to work at all.
I clearly am doing something wrong, what is it exactly?
-inkey
is an option and all options (must) begin with a hyphen. The privatekey file does need to be in PEM format inside, but it doesn't need to be named.pem
unless you want to. – dave_thompson_085 May 28 '20 at 23:29