Ruby's digital email sign with S / MIME

Is there a way in Ruby to digitally sign email messages with S / MIME? Our group uses PKI, and our users are driven by the expectation of digital signatures for important messages.

I know that I can call the openssl command-line tool:

openssl smime -sign -signer $CERT_FILE -passin pass:$CERT_PASS -in $UNSIGNED_MAIL -out $SIGNED_MAIL -certfile $CERT_CA_FILE -from 'your ' -to 'recipients < email@address >' -subject 'The Subject' 

but I hope to use a Ruby solution.

+6
ruby email openssl digital-signature smime
source share
1 answer

In the end, I used the above solution, but for those in a similar situation, you first need to convert the PKI key (in .p12 format): openssl pkcs12 -in #{@cert_file} -passin pass:#{@pass_phrase} -passout pass:#{@pass_phrase} -out #{out_file}

+1
source share

All Articles