Reputation: 111
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?
Upvotes: 0
Views: 89
Reputation: 75645
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.
Upvotes: 1