如何更改 openssl 配置?

发布于 2024-12-16 11:28:52 字数 348 浏览 5 评论 0原文

好吧,现在它简单明了,我已经用 php 生成了一个 openssl 证书,但是当我查看它时,它向我显示了相同的颁发者和颁发者,我如何更改颁发者现在我知道我们需要添加一个 ca从 openssl_csr_sign() 签署证书,如

openssl_csr_sign ( mix $csr , mix $cacert , mix $priv_key , int $days [, array $configargs [, int $serial = 0 ]] )

其中 $cacert 是 ca 证书并在其中提供 ca 证书,但是当我这样做时,它不会做任何更改,我的主要猜测是我必须编辑 openssl.cnf 但我不'不知道在哪里编辑才能得到这个结果。

Ok now its plain and simple i have generated a openssl certificate with php but when i view it, then it shows me the same issued by and issued to how do i change the issued by things now i know that we need to add a ca while signing the certificate from openssl_csr_sign() like

openssl_csr_sign ( mixed $csr , mixed $cacert , mixed $priv_key , int $days [, array $configargs [, int $serial = 0 ]] )

where $cacert is the ca certificate and provide a ca certificate in it but when i do that it doesn't do any changes my main guess is that i have to edit the openssl.cnf but i don't get it where to edit to get this result.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮世清欢 2024-12-23 11:28:52

除非我误解了你的意思,如果它是自签名/自颁发的证书,那就是这样。如果您想拥有由您以外的其他人颁发的有效“可信”证书,您需要从可信来源(verisign 等)获取第三方证书。

Unless I'm misunderstanding you, if it's a self signed/ self issued certificate, that's how it's going to be. You need to get a third party certificate from a trusted source (verisign etc.) if you want to have a valid "trusted" certificate issued by someone other than yourself.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文