2014-07-24 86 views
0

我想生成使用此處提供的解決方案的S/MIME證書: https://serverfault.com/questions/103263/can-i-create-my-own-s-mime-certificate-for-email-encryption 解決方案:創建S/MIME證書

openssl genrsa -des3 -out smime.key 4096 
openssl req -new -key smime.key -out smime.csr 
openssl x509 -req -days 365 -in smime.csr -CA ca.crt -CAkey ca.key -set_serial 1 -out smime.crt -setalias "Self Signed SMIME" -addtrust emailProtection -addreject clientAuth -addreject serverAuth -trustout 
openssl pkcs12 -export -in smime.crt -inkey smime.key -out smime.p12 

我要簽署MIME數據也提供憑據。我怎麼可能做到這一點? 任何幫助將非常感激。

回答

2

您已經在前三個命令中創建了用於簽署MIME的憑證。您可以用smime.keysmime.crt來簽署一些text_to_sign.txt文件:

openssl smime -sign -in text_to_sign.txt -inkey smime.key -signer smime.crt