S/Mime で署名および暗号化された電子メールを送信しようとしています。
私はこのコードを持っています:
// Sign the message first
openssl_pkcs7_sign("inc/admin/email/body.txt","inc/admin/email/body/enc.txt",
"signing_cert.pem",array("private_key.pem",
"test"),array());
// Get the public key certificate.
$pubkey = file_get_contents("cert.pem");
//encrypt the message, now put in the headers.
openssl_pkcs7_encrypt("signed.txt", "enc.txt", $pubkey,$headers,0,1);
私の質問は、どの証明書がどれですか? 私が持っている証明書を使用する場合(これは大丈夫ですか)、私が持っているファイルは次のとおりです。
- 。鍵
- .csr
- .crt
- およびパブリック.pem。
どれがどれですか?