0

I have a php file on a server. Some service will send requests to this file and i want to check if the variables: SSL_CLIENT_VERIFY, SSL_CLIENT_S_DN_O, SSL_CLIENT_S_DN_L, SSL_CLIENT_S_DN_CN, SSL_CLIENT_S_DN_C, SSL_CLIENT_I_DN_O, SSL_CLIENT_I_DN_CN, SSL_CLIENT_I_DN_C has the right values.

How to check them in PHP?

1
  • 1
    How is your PHP connected with the SSL layer? I assume via your webserver, so please list how you would obtain these values within / from your webserver first. Commented Jan 9, 2013 at 11:06

1 Answer 1

2

Assuming you're using Apache Httpd, you should be able to get access to the SSL environment variables using $_SERVER (for example $_SERVER['SSL_CLIENT_S_DN_CN']).

You'll also need to make sure your SSLOptions directive is configured accordingly for these variables to be used.

Sign up to request clarification or add additional context in comments.

2 Comments

Could You tell me how to configure SSLOptions ? Now when I display $_SERVER it doesn't contains any of the SSL variables
Just like it says in the first paragraph of the documentation I've linked to: SSLOptions StdEnvVars.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.