Secure areas of a site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hmsg
Forum Commoner
Posts: 42
Joined: Sun May 14, 2006 9:48 am

Secure areas of a site

Post by hmsg »

Hi!

I have a site that in some areas i only give access to same users, the users of my site have certificates so i need to select the users by the Distinguish name of they certificates.

Is there any way of I extract the DN(Distinguish Name) of they private certificates? Because i need that name to make a query to a database.


With the best regards

Hugo Gomes
hmsg
Forum Commoner
Posts: 42
Joined: Sun May 14, 2006 9:48 am

Post by hmsg »

I've discover how can we do that.

So heres the solution.

In PHP we can verify th DN with the Global Variable $_SERVER["SSL_CLIENT_S_DN"]


With the best regards

Hugo Gomes
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Interesting. Can you expand on that a little? What did you use to make the private certificates?
hmsg
Forum Commoner
Posts: 42
Joined: Sun May 14, 2006 9:48 am

Post by hmsg »

I don't do nothing :) I work in a loboratory that is a CA connected to CERN, but we only do certificates for researchers
Post Reply