summaryrefslogtreecommitdiff
path: root/libcli/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-25 21:18:15 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-06-01 17:11:24 +1000
commitfdc6db34caf4c30fd5bf439fcd3a5453fd26a590 (patch)
tree464e1f9e6078852f9411ce5760457ab2e3d132ce /libcli/auth
parent38a26f1073178736b8b3e1158a231b3ed7b6484a (diff)
downloadsamba-fdc6db34caf4c30fd5bf439fcd3a5453fd26a590.tar.gz
samba-fdc6db34caf4c30fd5bf439fcd3a5453fd26a590.tar.bz2
samba-fdc6db34caf4c30fd5bf439fcd3a5453fd26a590.zip
s4:ntlmssp Use common code for ntlmssp_sign.c
The common code does not have a mem_ctx on ntlmssp_check_packet() and ntlmssp_unseal_packet(). We do however need some internal working of the code exposed, so some structures are moved to ntlmssp_sign.h Andrew Bartlett
Diffstat (limited to 'libcli/auth')
-rw-r--r--libcli/auth/ntlmssp_private.h19
-rw-r--r--libcli/auth/ntlmssp_sign.c18
2 files changed, 19 insertions, 18 deletions
diff --git a/libcli/auth/ntlmssp_private.h b/libcli/auth/ntlmssp_private.h
index 0f0c7dbba9..e2044eea20 100644
--- a/libcli/auth/ntlmssp_private.h
+++ b/libcli/auth/ntlmssp_private.h
@@ -20,6 +20,25 @@
/* For structures internal to the NTLMSSP implementation that should not be exposed */
+#include "../lib/crypto/arcfour.h"
+
+struct ntlmssp_crypt_direction {
+ uint32_t seq_num;
+ uint8_t sign_key[16];
+ struct arcfour_state seal_state;
+};
+
+union ntlmssp_crypt_state {
+ /* NTLM */
+ struct ntlmssp_crypt_direction ntlm;
+
+ /* NTLM2 */
+ struct {
+ struct ntlmssp_crypt_direction sending;
+ struct ntlmssp_crypt_direction receiving;
+ } ntlm2;
+};
+
/* The following definitions come from libcli/auth/ntlmssp.c */
void debug_ntlmssp_flags(uint32_t neg_flags);
diff --git a/libcli/auth/ntlmssp_sign.c b/libcli/auth/ntlmssp_sign.c
index 61b52c6a61..3cf1ed75a7 100644
--- a/libcli/auth/ntlmssp_sign.c
+++ b/libcli/auth/ntlmssp_sign.c
@@ -22,7 +22,6 @@
#include "../libcli/auth/ntlmssp.h"
#include "../libcli/auth/libcli_auth.h"
#include "../lib/crypto/md5.h"
-#include "../lib/crypto/arcfour.h"
#include "../lib/crypto/hmacmd5.h"
#include "../lib/crypto/crc32.h"
#include "../libcli/auth/ntlmssp_private.h"
@@ -64,23 +63,6 @@ enum ntlmssp_direction {
NTLMSSP_RECEIVE
};
-struct ntlmssp_crypt_direction {
- uint32_t seq_num;
- uint8_t sign_key[16];
- struct arcfour_state seal_state;
-};
-
-union ntlmssp_crypt_state {
- /* NTLM */
- struct ntlmssp_crypt_direction ntlm;
-
- /* NTLM2 */
- struct {
- struct ntlmssp_crypt_direction sending;
- struct ntlmssp_crypt_direction receiving;
- } ntlm2;
-};
-
static NTSTATUS ntlmssp_make_packet_signature(struct ntlmssp_state *ntlmssp_state,
TALLOC_CTX *sig_mem_ctx,
const uint8_t *data, size_t length,