Forum Discussion

Gordon_Widera_1's avatar
Gordon_Widera_1
Icon for Nimbostratus rankNimbostratus
May 03, 2007

Problem inserting client cert

Hello,

 

 

I am trying to implement SOL5171, where I insert a client certificate into the header of an HTTP session.

 

 

Here is the iRule:

 

 

when HTTP_REQUEST {

 

if {[SSL::cert count] > 0} {

 

HTTP::header replace SSLClientCert [b64encode [SSL::cert 0]]

 

}

 

}

 

 

I have configured the SSL Client, and configured my virutal server to use the iRule resouce. However, when I get to the web page and look at the source, I do not see client certificate.

 

 

Thanks

 

 

Gordon
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Hi Gordon,

     

     

    There's a known issue with the SSL::cert values not traversing the events as expected.

     

     

    To work around this problem, you'll need to save the cert into the session table in the CLIENTSSL_CLIENTCERT event, then retrieve it in the HTTP_REQUEST event, as in these posts:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&view=topic&forumid=5&postid=13968 (Click here)

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&view=topic&postid=13667 (Click here)

     

     

    (I believe that the encoding and header/footer manipulation requirements will depend on the type of certificate presented.)

     

     

    HTH

     

    /deb