Mithrand1r
Mithrand1r

Reputation: 2353

php SSL client certificate authentication

I already heard of SSL_CLIENT_S_DN_CN attribute of $_SERVER variable ( yet I am failing in configure apache to get this variable but this is another topic).

And I wonder if I am able to get *.crt file of those values. Does anyone have done this? Such operation is possible?

Upvotes: 1

Views: 6384

Answers (1)

Damien
Damien

Reputation: 664

I think you can use $_SERVER['SSL_CLIENT_CERT']

For this attribute to be filled, you need to add SSLOptions +ExportCertData to your apache config

Never tried though, I use 'SSL_CLIENT_I_DN_*' attributes so the complete certificate will not be send with every request from apache to php : explained here

Upvotes: 3

Related Questions