Here is how one should sign a message with openssl smime
? according to the docs
openssl smime -sign -in in.txt -text -out mail.msg -signer mycert.pem \
-inkey mykey.pem -certfile mycerts.pem
But why is there a -signer
key with a certificate -- isn't a private key passed in -inkey
enough for message signing? Isn't it just a usual asymmetric encryption scheme, where my private key is for message signing and my certificate (i.e., signed public key corresponding to my private key) is for my counterpart to encrypt the message?