r6468: Fix LOCAL-NTLMSSP test with new NTLMSSP structure.
authorAndrew Bartlett <abartlet@samba.org>
Mon, 25 Apr 2005 12:13:38 +0000 (12:13 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:40 +0000 (13:11 -0500)
Andrew Bartlett

source/torture/auth/ntlmssp.c

index a29f99757c003ba9a467a17bd475c4cd8aab902a..644d502d99e02c27ea468156e5d7162dbeebbb89 100644 (file)
@@ -26,7 +26,6 @@
 BOOL torture_ntlmssp_self_check(void) 
 {
        struct gensec_security *gensec_security;
 BOOL torture_ntlmssp_self_check(void) 
 {
        struct gensec_security *gensec_security;
-       struct ntlmssp_state *ntlmssp_state;
        struct gensec_ntlmssp_state *gensec_ntlmssp_state;
        DATA_BLOB data;
        DATA_BLOB sig, expected_sig;
        struct gensec_ntlmssp_state *gensec_ntlmssp_state;
        DATA_BLOB data;
        DATA_BLOB sig, expected_sig;
@@ -47,17 +46,16 @@ BOOL torture_ntlmssp_self_check(void)
        }
 
        gensec_ntlmssp_state = gensec_security->private_data;
        }
 
        gensec_ntlmssp_state = gensec_security->private_data;
-       ntlmssp_state = gensec_ntlmssp_state->ntlmssp_state;
 
 
-       ntlmssp_state->session_key = strhex_to_data_blob("0102030405060708090a0b0c0d0e0f00");
+       gensec_ntlmssp_state->session_key = strhex_to_data_blob("0102030405060708090a0b0c0d0e0f00");
        dump_data_pw("NTLMSSP session key: \n", 
        dump_data_pw("NTLMSSP session key: \n", 
-                    ntlmssp_state->session_key.data,  
-                    ntlmssp_state->session_key.length);
+                    gensec_ntlmssp_state->session_key.data,  
+                    gensec_ntlmssp_state->session_key.length);
 
 
-       ntlmssp_state->server_use_session_keys = True;
-       ntlmssp_state->neg_flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_KEY_EXCH | NTLMSSP_NEGOTIATE_NTLM2;
+       gensec_ntlmssp_state->server_use_session_keys = True;
+       gensec_ntlmssp_state->neg_flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_128 | NTLMSSP_NEGOTIATE_KEY_EXCH | NTLMSSP_NEGOTIATE_NTLM2;
 
 
-       if (!NT_STATUS_IS_OK(status = ntlmssp_sign_init(ntlmssp_state))) {
+       if (!NT_STATUS_IS_OK(status = ntlmssp_sign_init(gensec_ntlmssp_state))) {
                printf("Failed to sign_init: %s\n", nt_errstr(status));
                return False;
        }
                printf("Failed to sign_init: %s\n", nt_errstr(status));
                return False;
        }
@@ -97,17 +95,16 @@ BOOL torture_ntlmssp_self_check(void)
        }
 
        gensec_ntlmssp_state = gensec_security->private_data;
        }
 
        gensec_ntlmssp_state = gensec_security->private_data;
-       ntlmssp_state = gensec_ntlmssp_state->ntlmssp_state;
 
 
-       ntlmssp_state->session_key = strhex_to_data_blob("0102030405e538b0");
+       gensec_ntlmssp_state->session_key = strhex_to_data_blob("0102030405e538b0");
        dump_data_pw("NTLMSSP session key: \n", 
        dump_data_pw("NTLMSSP session key: \n", 
-                    ntlmssp_state->session_key.data,  
-                    ntlmssp_state->session_key.length);
+                    gensec_ntlmssp_state->session_key.data,  
+                    gensec_ntlmssp_state->session_key.length);
 
 
-       ntlmssp_state->server_use_session_keys = True;
-       ntlmssp_state->neg_flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_KEY_EXCH;
+       gensec_ntlmssp_state->server_use_session_keys = True;
+       gensec_ntlmssp_state->neg_flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_KEY_EXCH;
 
 
-       if (!NT_STATUS_IS_OK(status = ntlmssp_sign_init(ntlmssp_state))) {
+       if (!NT_STATUS_IS_OK(status = ntlmssp_sign_init(gensec_ntlmssp_state))) {
                printf("Failed to sign_init: %s\n", nt_errstr(status));
                return False;
        }
                printf("Failed to sign_init: %s\n", nt_errstr(status));
                return False;
        }