Jump to content

Need suggestion on reading ssl certificates through php


skyracer85

Recommended Posts

Hi Members,

In our company everyone having a ssl certificate in browser, which has details about the employee number.

 

I need to build a php application, it has to be automatically logged in based on the certificate. Can you please guide me how can i read those certificates for automatic login of my php page.

 

Regards,

Rajesh

The actual reading and parsing of the certificate is something you'd setup via your webserver's SSL options. For example, if you are using apache then you configure SSLVerifyClient and SSLOptions +StdEnvVars

 

When the browser requests a page it will present the certificate to the server which will parse and validate it. It will then export a bunch of different environment variables which you can then access via PHP's $_SERVER array to do any additional validations/logins/etc you need to do.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.