store certificate which we got via SSL handshake

40 views Asked by At

We have done client certificate authentication via SSLVerifyClient require method. Now authentication is being done as required.

Now we want to store the client certificate which we is being presented by the client during SSL handshake.

Is there a way I can save the client certificate which I am getting during authentication into a directory or somewhere? I need to get the public key and CN information from the client certificate.

1

There are 1 answers

0
Steffen Ullrich On BEST ANSWER

Apache provides the full certificates and extracted parts of it using a variety of environment variables, like SSL_CLIENT_CERT for the full certificate or SSL_CLIENT_S_DN for the subject DN. See the documentation for more details on this.