Forum Discussion
Jeff_Green_4244
Nov 07, 2011Nimbostratus
Create Domino LTPA token on F5 problem
Hi,
I'm trying to use the code at
http://per.lausten.dk/blog/2009/06/how-to-create-a-ltpa-session-cookie-for-lotus-domino-using-f5.html
to create a Domino LTPA token but...
Kurt_Knochner_5
Nov 09, 2011Cirrus
Hi,
it's a more general "problem" and related to the concatenation of strings, where the first string starts with \x00. 0x00 would be the terminator for a string in C. I'm not sure how TCL handles that. The strange thing is, that binary scan shows the correct value, while b64encode followed by a b64decode leads to the additional c080.
rule irule03a {
when RULE_INIT {
set hello "Hello World"
log local0. "WITH leading \\x00"
set prefix "\x00\x01\x02\x03"
log local0. "WITHOUT leading \\x00"
set prefix "\x01\x02\x03"
set text "${prefix}${hello}"
log local0. "WITHOUT concatenation"
set text "\x00\x01\x02\x03HelloWorld"
set text_enc [b64encode $text]
set text_dec [b64decode $text_enc]
binary scan $text H* text_hex
binary scan $text_enc H* text_enc_hex
binary scan $text_dec H* text_dec_hex
log local0. "Text: $text"
log local0. "Text hex: $text_hex"
log local0. "Text encoded: $text_enc_hex"
log local0. "Text decoded: $text_dec_hex"
}
}
Nov 9 04:45:36 local/tmm info tmm[5158]: Rule irule03a : WITHOUT concatenation
Nov 9 04:45:36 local/tmm info tmm[5158]: Rule irule03a : Text: ÀHelloWorld
Nov 9 04:45:36 local/tmm info tmm[5158]: Rule irule03a : Text hex: 0001020348656c6c6f576f726c64
Nov 9 04:45:36 local/tmm info tmm[5158]: Rule irule03a : Text encoded: 414145434130686c62477876563239796247513d
Nov 9 04:45:36 local/tmm info tmm[5158]: Rule irule03a : Text decoded: 0001020348656c6c6f576f726c64
Nov 9 04:46:01 local/tmm info tmm[5158]: Rule irule03a : WITH leading \x00
Nov 9 04:46:01 local/tmm info tmm[5158]: Rule irule03a : Text: ÀHello World
Nov 9 04:46:01 local/tmm info tmm[5158]: Rule irule03a : Text hex: 0001020348656c6c6f20576f726c64
Nov 9 04:46:01 local/tmm info tmm[5158]: Rule irule03a : Text encoded: 7749414241674e495a5778736279425862334a735a413d3d
Nov 9 04:46:01 local/tmm info tmm[5158]: Rule irule03a : Text decoded: c08001020348656c6c6f20576f726c64
Nov 9 04:46:13 local/tmm info tmm[5158]: Rule irule03a : WITHOUT leading \x00
Nov 9 04:46:13 local/tmm info tmm[5158]: Rule irule03a : Text: Hello World
Nov 9 04:46:13 local/tmm info tmm[5158]: Rule irule03a : Text hex: 01020348656c6c6f20576f726c64
Nov 9 04:46:13 local/tmm info tmm[5158]: Rule irule03a : Text encoded: 415149445347567362473867563239796247513d
Nov 9 04:46:13 local/tmm info tmm[5158]: Rule irule03a : Text decoded: 01020348656c6c6f20576f726c64
Regards
Kurt Knochner
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