Forum Discussion
Al_17441
Nimbostratus
Dec 28, 2007Need to Pass Cert_Cookie server variable
Sorry for such the newb question, but i couldn't find and answer anywhere.. i need to pass the Cert_Cookie server variable through my custom irule. I already have the subject, issuer and serial number for the cert being passed. I just can not seem to figure out how to pass the 'CERT_COOKIE' variable.
Thanks in advance.
when CLIENTSSL_HANDSHAKE
{
set cur [SSL::sessionid]
set ask [session lookup ssl $cur]
if { $ask eq "" } {
session add ssl [SSL::sessionid] [SSL::cert 0]
}
}
when HTTP_REQUEST
{
HTTP::header replace HTTPS on
set id [SSL::sessionid]
set the_cert [session lookup ssl $id]
if { $the_cert != "" }
{
set pkiSubject [X509::subject $the_cert]
set pkiIssuer [X509::issuer $the_cert]
$pkiSubject is the first line on PKIInfo
log "$pkiSubject"
$pkiIssuer is the third line on PKIInfo
log "$pkiIssuer"
HTTP::header insert SSL-Client-Cert [ join [string trim [string map { "-----BEGIN CERTIFICATE-----" "" "-----END CERTIFICATE-----" ""} [X509::whole $the_cert ] ] ] "" ]
HTTP::header insert CN $pkiSubject
HTTP::header insert SSLIssuer $pkiIssuer
HTTP::header insert SSLClientCertSN [regsub -all {:} [X509::serial_number $the_cert] -]
}
- hoolio
Cirrostratus
In a quick search, I couldn't find any specific explanation of what the CERT_COOKIE CGI variable is parsed from. This seems to be the stock explanation most sites have: - Al_17441
Nimbostratus
Thanks Aaron, - hoolio
Cirrostratus
Hi Al,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects