Forum Discussion
James_Yang_9981
Altostratus
Aug 08, 2007need help on irules encoding
customer using BIGIP to do SSL acc, but they need insert the DN of client cert to request http header. we encounter the encoding issue there...
the original DN of client is:
CN=041@0110200608081555@开发部@00000001,OU=Employees,OU=DEP,O=CFCA TEST CA,C=CN
what the BIGIP 9.4.1 output is:
CN=041@0110200608081555@\E5\BC\80\E5\8F\91\E9\83\A8@00000001,OU=Employees,OU=DEP,O=CFCA TEST CA,C=CN
and BIGIP 9.1.2 output is:
CN=\x000\x004\x001\x00@\x000\x001\x001\x000\x002\x000\x000\x006\x000\x008\x000\x008\x001\x005\x005\x005\x00@_\x00S\xD1\x90\xE8\x00@\x000\x000\x000\x000\x000\x000\x000\x001
the diffrence of the 9.1.2 and 9.4.1 is because of CR65543. but it seems that it's only partial completed CR.
the point here is that rules output is using ASCII to represent the UTF-8 code. but acturally, the server expected is the byte-stream of UTF-8 format but not "ASCII like" UTF-8. So there must something need to be done on this.
has open a case and do some basic research on the convertion. Till now, the best aproach I got is a small convertion code on bigip 9.4.1:
echo -n "\E5\BC\80\E5\8F\91\E9\83\A8" | sed -e 's/\\//g' | perl -e 'print pack("H*", )' | iconv -f utf8 -t gb2312
this will output the actual gb2312 character that I can seen it on terminal in my Chinese Windows version.
does this can be done by rules?
I found TCL has
encoding convertto (not sure if it is working in BIGIP environment)
binary format
regsub all
that may used for convertion. but really need help on how to make a working rule that can do it.
Thanks
- Deb_Allen_18Historic F5 AccountI've dug up a number of other posts on the same topic as well, and I'm building a consolidated case to escalate to Support.
- James_Yang_9981
Altostratus
I have edit the oringinal post with the 9.1.2 output. PLS refer case C370539 for more detail about this issue. - Deb_Allen_18Historic F5 AccountOK, great.
- Joseph_Chan_463Historic F5 AccountI download a program called ascii2uni from this website AND change its c code so that it will parse rfc2253 format strings, i.e. the output format of Bigip.
- Joseph_Chan_463Historic F5 AccountRFC2822 section 2.2 states that headers must use printable US-ASCII. Putting raw UTF8 in any header violates RFC. The server mentioned in the first posting will never get a plain UTF8 string from an HTTP header.
- James_Yang_9981
Altostratus
yes, that is exactly the result of the case process. I have tested it and confirm that will works in most of cases.
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