From f5a8054f266a241d43a4c5d3ca908f8edfcc01f4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 25 Apr 2005 09:23:56 +0000 Subject: r6463: Move NTLM2 and NTLM (v1) specific variables into a union for DCE/RPC. Andrew Bartlett (This used to be commit 227f2578da140067734f55b559760871ee4d0d12) --- source4/auth/ntlmssp/ntlmssp.h | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'source4/auth/ntlmssp/ntlmssp.h') diff --git a/source4/auth/ntlmssp/ntlmssp.h b/source4/auth/ntlmssp/ntlmssp.h index 2aa9aea810..65292b438b 100644 --- a/source4/auth/ntlmssp/ntlmssp.h +++ b/source4/auth/ntlmssp/ntlmssp.h @@ -106,10 +106,6 @@ struct ntlmssp_state uint32_t neg_flags; /* the current state of negotiation with the NTLMSSP partner */ - /* internal variables used by NTLM2 */ - BOOL doing_ntlm2; - uint8_t session_nonce[16]; - /* internal variables used by KEY_EXCH (client-supplied user session key */ DATA_BLOB encrypted_session_key; @@ -162,21 +158,28 @@ struct ntlmssp_state const char *server_name; const char *(*get_domain)(void); - /* SMB Signing */ - uint32_t ntlm_seq_num; - uint32_t ntlm2_send_seq_num; - uint32_t ntlm2_recv_seq_num; - - /* ntlmv2 */ - DATA_BLOB send_sign_key; - DATA_BLOB recv_sign_key; - - struct arcfour_state *send_seal_hash; - struct arcfour_state *recv_seal_hash; - - /* ntlmv1 */ - struct arcfour_state *ntlmssp_hash; + BOOL doing_ntlm2; + union { + /* NTLM */ + struct { + uint32_t seq_num; + struct arcfour_state *arcfour_state; + } ntlm; + + /* NTLM2 */ + struct { + uint32_t send_seq_num; + uint32_t recv_seq_num; + DATA_BLOB send_sign_key; + DATA_BLOB recv_sign_key; + struct arcfour_state *send_seal_arcfour_state; + struct arcfour_state *recv_seal_arcfour_state; + + /* internal variables used by NTLM2 */ + uint8_t session_nonce[16]; + } ntlm2; + }; }; struct gensec_ntlmssp_state { -- cgit