在 PHP 中从 PFX 证书中提取 RSA 私钥
如何从 PHP 中的 .PFX 证书中提取 RSA 私钥?我在终端中使用了这个命令,它工作正常,
openssl pkcs12 -in cert.pfx -nocerts -nodes -passin pass:1234 | openssl rsa -out privkey.pem
我基本上需要执行与该命令相同的操作,但是在 PHP 中,当用户上传文件时,我尝试使用 openssl_pkcs12_read
但它没有 RSA 私钥。
How can I extract RSA PRIVATE KEY from .PFX certificate in PHP? I used this command in terminal and it works
openssl pkcs12 -in cert.pfx -nocerts -nodes -passin pass:1234 | openssl rsa -out privkey.pem
I basically need to do the same as that command but in PHP when user uploads their file, I've tried with openssl_pkcs12_read
but it doesn't have RSA PRIVATE KEY.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论