1.

Solve : openssl encryption?

Answer»

I received a PUBLIC key from a vendor.  What commands must I ISSUE to use the public key for encrypting the file using openssl?
Not my choice that I must use openssl...

# openssl smime -encrypt -binary -des3 -outform DER -in file.txt -out file.ssl Vendor_Pub.key 
unable to LOAD certificate
9765066:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:650:EXPECTING: TRUSTED CERTIFICATE

I guess I am missing something....It expects your certificate to be in .der instead of .pem format, you would use openssl rsa -in Vendor_Pub.key -inform PEM -out output.key -outform DER and then try encrypting again with the outputted key.



Discussion

No Comment Found