gpt4 book ai didi

php - 在 php 中重定向到 https 服务器

转载 作者:太空宇宙 更新时间:2023-11-03 14:10:32 25 4
gpt4 key购买 nike

我正在尝试重定向到执行客户端身份验证并在 php 中建立 https 连接的服务器。我正在使用以下命令:

header('Location:https://example.com'); 

但我不知道如何在此重定向中发送客户端证书。不发送证书我无法连接到服务器。如何在重定向中附加客户端证书?

最佳答案

But I cannot figure out how to send the client certificate in this redirect.

你没有。 httpd 发送的证书比客户端和服务器开始讨论处理您的脚本要早得多(协议(protocol)的这个阶段称为“握手”)(请参阅:How HTTPS actually works)。您必须正确设置您的 httpd,安装证书和私钥,也许还有证书颁发者的证书颁发机构(或者您自己的 CA,如果您使用的是自签名证书)。网上有很多关于这样做的帖子,所以谷歌一下。

关于php - 在 php 中重定向到 https 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31816857/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com