我試圖發送S/Mime簽名和加密的電子郵件。S/Mime登錄PHP - 哪個文件是哪個證書?
我有這樣的代碼:
// 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);
我的問題是其證書是哪個?如果我使用我有證書(這是正確的),我有文件是:
- .KEY
- 的.csr
- .CRT
- 和公衆。質子交換膜。
哪個是哪個?
我知道,在這個階段,我只是想讓它工作。 – 2012-02-17 12:15:49