Forum Discussion
richard_lyonnel
Nimbostratus
Feb 06, 2015Is anybody can correct this irule syntaxe. Thanks
when CLIENTSSL_CLIENTCERT {
if {[SSL::cert count] > 0}{
set client_cert [SSL::cert 0]
set CLIENT “[ join [string trim [string map { “—–BEGIN CERTIFICATE—–” “” “—–END CERTIFICATE—–” “”} [X509::whole $...
Michael_Jenkins
Cirrostratus
Feb 06, 2015Try this. You had some encoding issues it seems, and were missing a
]:
when CLIENTSSL_CLIENTCERT {
if {[SSL::cert count] > 0}{
set client_cert [SSL::cert 0]
set CLIENT "[join [string trim [string map {"--BEGIN CERTIFICATE--" "" "--END CERTIFICATE--" ""} [X509::whole $client_cert]]] ""]"
} else {
log local0. "no cert found during clientssl_clientcert"
}
}
when HTTP_REQUEST {
if { [SSL::cert count] > 0 } {
set CLIENT "[join [string trim [string map {"--BEGIN CERTIFICATE--" "" "--END CERTIFICATE--" ""} [X509::whole $client_cert]]] ""]"
HTTP::header insert "NSClientCert" "—–BEGIN CERTIFICATE—– $CLIENT —–END CERTIFICATE—–"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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