可以使用phpmailer与s/mime签名,获取“签名错误:”
我正在使用phpmailer尝试发送签名的电子邮件(S/MIME)。
我用了 John dalesandro的出色教程 创建一个自签名的S/MIME证书并以PKCS12格式打包。
然后,我遵循 制作 cert.crt,cert.key& certchain.pem 来自我的PKCS12包装。
当我使用下面的代码签名时,我会收到“签名错误:”:
$mail->sign(
'/mypath/cert.crt',
'/mypath/cert.key',
'mypassword',
'/mypath/certchain.pem'
);
当我不尝试签署电子邮件时,电子邮件将正常发送。
由于我的错误代码中根本没有解释,因此我不明白我在做什么错。
I'm using phpmailer to try to send signed emails (S/MIME).
I used this
excellent tutorial by John Dalesandro
to create a Self-Signed S/MIME Certificate and package it in PKCS12 Format.
I then followed the instructions in PHPMailer S/MIME signing
to make cert.crt, cert.key & certchain.pem from my PKCS12 package.
When I sign with the code below I get "Signing Error:" :
$mail->sign(
'/mypath/cert.crt',
'/mypath/cert.key',
'mypassword',
'/mypath/certchain.pem'
);
The emails are sent normally when I don't try to sign the email.
Since there is no explanation at all in my error code, I don't understand what I'm doing wrong.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
因此,我从外部证书授权机构中获得了PKCS12的S/MIME证书。然后,我制作了 cert.crt,cert.key& certchain.pem 如上所述,现在起作用。
So I got a S/MIME certificate in PKCS12 from a external certificate authority. I then made a cert.crt, cert.key & certchain.pem as stated above and now it works.