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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.