Tk Library Source Code

View Ticket
Login
Ticket UUID: 1323295
Title: sasl test failure for Tcl 8.5
Type: Bug Version: None
Submitter: dgp Created on: 2005-10-10 21:22:14
Subsystem: sasl Assigned To: patthoyts
Priority: 9 Immediate Severity:
Status: Closed Last Modified: 2005-10-11 21:25:08
Resolution: None Closed By: patthoyts
    Closed on: 2005-10-11 14:25:08
Description:
Create one then move this bug
report to it:

The following test fails against
the curren Tcl HEAD on 32-bit
platforms:

==== SASL-NTLM-1.1 NTLM client response FAILED
==== Contents of test case:

    list [catch {
        set ctx [SASL::new -mechanism NTLM -callback
NTLMCallback]
        SASL::step $ctx ""
        SASL::step $ctx [base64::decode $Chk(2)]
        set response [SASL::response $ctx]
        SASL::cleanup $ctx
        base64::encode -maxlen 0 $response
    } res] $res

---- Result was:
0
TlRMTVNTUAADAAAAGAAYAGoAAAAYABgAggAAAAwADABAAAAACAAIAEwAAAAWABYAVAAAAJoAAAABAgAAAAAAAABEAE8ATQBBAEkATgB1AHMAZQByAFcATwBSAEsAUwBUAEEAVABJAE8ATsM3zVy9RPyXgqZnr21CfG3mfCDC0+d8VoLTftHx9ZaM2NlnEeJBCjvPm4ryx3aR4A==
---- Result should have been (exact matching):
0
TlRMTVNTUAADAAAAGAAYAGoAAAAYABgAggAAAAwADABAAAAACAAIAEwAAAAWABYAVAAAAJoAAAABAgAAAAAAAEQATwBNAEEASQBOAHUAcwBlAHIAVwBPAFIASwBTAFQAQQBUAEkATwBOAMM3zVy9RPyXgqZnr21CfG3mfCDC0+d8ViWpjBwx6BhHRmspst9GgPOZWPuMITqcxg==
==== SASL-NTLM-1.1 FAILED

It's possible the actual bug is really in Tcl, but
assistance of the sasl maintainers will be
helpful to determine that.
User Comments: patthoyts added on 2005-10-11 21:25:08:
Logged In: YES 
user_id=202636

The fault is that [encoding convertto unicode $str] produces
different byte-order output on sparc and intel. NTLM
requires little-endian unicode strings.
Fixed by byte-swapping on big-endian systems.