diff --git a/lib/gssapi/test_ntlm.c b/lib/gssapi/test_ntlm.c index fc904c58a..ad037993a 100644 --- a/lib/gssapi/test_ntlm.c +++ b/lib/gssapi/test_ntlm.c @@ -64,7 +64,7 @@ test_libntlm_v1(void) memset(&type2, 0, sizeof(type2)); memset(&type3, 0, sizeof(type3)); - type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_NTLM; + type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_NTLM|NTLM_NEG_KEYEX; type1.domain = strdup(domain); type1.hostname = NULL; type1.os[0] = 0; @@ -113,12 +113,19 @@ test_libntlm_v1(void) { struct ntlm_buf key; + struct ntlm_buf sessionkey; + heim_ntlm_nt_key(password, &key); heim_ntlm_calculate_ntlm1(key.data, key.length, type2.challange, &type3.ntlm); + + heim_ntlm_build_ntlm1_master(key.data, key.length, + &sessionkey, + &type3.sessionkey); free(key.data); + free(sessionkey.data); } ret = heim_ntlm_encode_type3(&type3, &data); @@ -168,7 +175,7 @@ test_libntlm_v2(void) memset(&type2, 0, sizeof(type2)); memset(&type3, 0, sizeof(type3)); - type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_NTLM; + type1.flags = NTLM_NEG_UNICODE|NTLM_NEG_NTLM|NTLM_NEG_KEYEX; type1.domain = strdup(domain); type1.hostname = NULL; type1.os[0] = 0; @@ -218,6 +225,7 @@ test_libntlm_v2(void) { struct ntlm_buf key; unsigned char ntlmv2[16]; + struct ntlm_buf sessionkey; heim_ntlm_nt_key(password, &key); @@ -229,6 +237,11 @@ test_libntlm_v2(void) ntlmv2, &type3.ntlm); free(key.data); + + heim_ntlm_build_ntlm1_master(ntlmv2, sizeof(ntlmv2), + &sessionkey, + &type3.sessionkey); + free(sessionkey.data); } ret = heim_ntlm_encode_type3(&type3, &data);