Forum Discussion
HTTP header insert with CN and for SHA1 thumbprint of the SSL certificate ?
Thanks, I modified it please check once
when CLIENTSSL_CLIENTCERT priority 100 {
if {[SSL::cert count] > 0} {
set clientCert [X509::whole [SSL::cert 0]]
set clientCertSubject [X509::subject [SSL::cert 0]]
set cert_hash [X509::hash [SSL::cert 0]]
foreach field [ split $clientCertSubject ","] {
if {$field starts_with "CN="} {
set clientCommonName [getfield $field "=" 2]
}
}
}
}
when HTTP_REQUEST {
if {(info exists clientCert) && ($clientCert ne "") } {
HTTP::header insert X-Client-Cert $clientCert
}
if {(info exists clientCommonName) && ($clientCommonName ne "") } {
HTTP::header insert X-Client-CN $clientCommonName
}
{
HTTP::header insert X-Client-CN $clientCommonName
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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