PHP Certificate and LDAP Check Demonstration Page

(If this appears as jumbled text with missing line breaks, and you were looking to see the source, your browser is interpreting text/php as html; try viewing the source for this page.)
check_cert(); //returns an error_msg if ($pki_chk_results != "valid") { //a "valid" result means the cert was valid, and the user was found in the ldap //handle the error here; // redirect to another page, //or display alternate html print "Error: ".$pki_chk_results; } else { // if the cert is valid, this section will get executed. // if the error-handling is a redirect, you can just fall through this to the rest of // the page. ?> Your HTML could be here, serving any desired purpose.
You can reference the SSL variables to create personalized pages.
'; print 'Your certificate expires on '.$_SERVER["SSL_CLIENT_V_END"].' '; ?>