简体   繁体   中英

Redirect to https server in php

I am trying to redirect to a server that does Client authentication and establishes an https connection in php. I am using the following command:

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

But I cannot figure out how to send the client certificate in this redirect. without sending the certificate I cannot connect with the server. How can I attach the client certificate in the redirect?

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

You do not. Certificate are send by httpd much earlier (this phase of the protocol is called "handshake") than client and server start talking about dealing with your scripts (see: How HTTPS actually works ). You must set up correctly your httpd, install certificate and private key and perhaps certificate authority of certificate issuer (or your own CA if you are playing with self signed certs). There're lot of posts on the net about doing that, so google.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM