moving to support go get
This commit is contained in:
30
ntlm/messages/negotiate_flags_test.go
Normal file
30
ntlm/messages/negotiate_flags_test.go
Normal file
@@ -0,0 +1,30 @@
|
||||
//Copyright 2013 Thomson Reuters Global Resources. All Rights Reserved. Proprietary and confidential information of TRGR. Disclosure, use, or reproduction without written authorization of TRGR is prohibited.
|
||||
package messages
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFlags(t *testing.T) {
|
||||
// Sample value from 4.2.2 NTLM v1 Authentication
|
||||
bytes, _ := hex.DecodeString("338202e2")
|
||||
|
||||
flags := uint32(0)
|
||||
flags = NTLMSSP_NEGOTIATE_KEY_EXCH.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_56.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_128.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_VERSION.Set(flags)
|
||||
flags = NTLMSSP_TARGET_TYPE_SERVER.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_ALWAYS_SIGN.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_NTLM.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_SEAL.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_SIGN.Set(flags)
|
||||
flags = NTLM_NEGOTIATE_OEM.Set(flags)
|
||||
flags = NTLMSSP_NEGOTIATE_UNICODE.Set(flags)
|
||||
|
||||
if flags != binary.LittleEndian.Uint32(bytes) {
|
||||
t.Error("NTLM Flags are not correct")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user