Skip to main content
Inspiring
March 16, 2010
Question

Reading Current SSL Client Certificate Data

  • March 16, 2010
  • 1 reply
  • 1669 views

I have an SSL enabled website which requires client certificates using Cold Fusion (Current Version is 8, upgrading to 9).  We currently use the CGI variable CERT_SUBJECT to extract a user's common name from their client certificate from the website (Using IIS 6.0).  We use this Common Name value to determine who the user is, however I have new requirements which state I can no longer utilize the Subject Field, I must use a value located in Subject Alternative Name Field if it exists.   Is there a way to programmatically sift through the current client certificate being used in the current session and read all existing fields and their values that exist within that client certificate?

    This topic has been closed for replies.

    1 reply

    jmaitinoAuthor
    Inspiring
    March 22, 2010

    Ok, I found my answer, this will return an entire x509 certificate's information...

    <cfset x509 = GetPageContext().getRequest().getAttribute("javax.servlet.request.X509Certificate")>

    <cfdump var=#x509[1]#>