I have a Problem with openssl, espacialy with the s/mime function.
I want to write a script that send an encrypted mail.
My digital ID is generated by trust center. My public certificate I've exporter from a signated email, in the following way:
Code: Select all
openssl smime -verify -in mail.msg -signer user.pem -out signedtext.txt
To generate the encrypted message, I use following line:
Code: Select all
openssl smime -encrypt -in in.txt -from from@gmx.de -to to@gmx.de -subject "test" -out out.txt user.pem
Code: Select all
To: to@gmx.de
From: from@gmx.de
Subject: test
MIME-Version: 1.0
Content-Disposition: attachment; filename="smime.p7m"
Content-Type: application/pkcs7-mime; smime-type=enveloped-data; name="smime.p7m"
Content-Transfer-Encoding: base64
MIIBZgYJKoZIhvcNAQcDoIIBVzCCAVMCAQAxggEPMIIBCwIBADB0MG8xCzAJBgNV
BAYTAkRFMQ4wDAYDVQQHFAVLw7ZsbjEOMAwGA1UEChMFTURuZXQxETAPBgNVBAsT
f37BIE1EbmV0MREwDwYDVQQDEwhDQSBNRG5ldDEaMBgGCSqGSIb3DQEJARYLY2FA
bWRuZXQuZGUCAQMwDQYJKoZIhvcNAQEBBQAEgYAJ9k2v35zz1Wo7z9rRGZHvQiVQ
Izw3LO1UihbntUjy+g4Hz43nY+kigLDDo39irky0NybhuM1q6AVx8/i4RHASzIuo
HAnEQzzRFaZPqXQj/Chebl7sgp++aFu/0ZFoEEOZjEv3QfsVpgVyX3Y1XVlQChYo
F28plv6tjU9YR2OHOTA7BgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECEpAgeuCJCAM
gBgp6Zv2N+woJ4Rw/Sn2nAs6MFhduLPQ=
My config is:
- freenas 8.0.3 (based on FreeBSD 8.2)
- openssl 0.9.8q
I tried it on my Mac, too with the same failure, here the config is:
- Mac OS X Lion 10.7
- openssl 0.9.8r
Where is my failure? Can somebody help me?
Thanks