Forum Discussion
Ichnafi
Cirrostratus
Mar 07, 2016Insert certificate in HTTP header fails, depending on what is logged
Hi,
I have stumbled upon a strange behavior. I insert a client certificate into the HTTP header. Nothing fancy. Then I wanted to add some DEBUG Messages to see what's happening. And here my confusi...
Kai_Wilke
MVP
Mar 07, 2016Hi Ichnafi,
the command
[X509::whole [SSL::cert 0]]
outputs multi-line text. Multi-line value can't be insert into a header without applying some encodings (e.g. Base64, Hex, URL-Encoding) to it. So I would recommend to wrap the certificate into B64 before setting the header and then use Base64 decoding on the server side to retrive the certificate.
HTTP::header insert "X-CLIENT-CERT" [b64encode [X509::whole [SSL::cert 0]]]
Cheers, Kai
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