Forum Discussion
HTTP-Header - insert client-cert -- blank at last?
I have a iRule like this:
when HTTP_REQUEST {
check if there is a SSL certificate available
if { [SSL::cert count] > 0 } {
insert this cert in PEM format to the (X-ENV-SSL_CLIENT_CERTIFICATE) HTTP Header
HTTP::header insert "X-CLIENT-CERT" "[X509::whole [SSL::cert 0]]"
}
}
It works fine. But now, the server-admin will upgrade the apache from 2.2 to 2.4. There is a mismatch at the End of the Header:
Do you know: is the blank a known Problem?
Thanks
2 Replies
- Andy_McGrath
Cumulonimbus
To remove white space from the cert data use string trim command, that should make Apache a bit happier.
e.g.
[string trim [X509::whole [SSL::cert 0]]]
- youssef1
Cumulonimbus
Hi,
I do not think space can pose a problem, but it's depending how Apache will react and what it waiting for. So you confirm that your problem come from Apache? when it receive the cert inside the header...
You can remove newline/space using this command;
set clear_cert [findstr [string map {" " "" "\n" ""} [X509::whole [SSL::cert 0]]]
Keep me in touch.
regards
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