summaryrefslogtreecommitdiffstats
path: root/src/ntlm_crypto.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-04-05 14:51:02 -0400
committerSimo Sorce <simo@redhat.com>2014-05-04 17:21:06 -0400
commitfe612bf48a46789cc7e4a4c1e637fe17d2796a97 (patch)
tree4bd37b88c06ec05a7e8b18b83b1ef078a580f826 /src/ntlm_crypto.c
parent0af4f35f01fef417b42fbad0a9ad774043d898be (diff)
downloadgss-ntlmssp-fe612bf48a46789cc7e4a4c1e637fe17d2796a97.tar.gz
gss-ntlmssp-fe612bf48a46789cc7e4a4c1e637fe17d2796a97.tar.xz
gss-ntlmssp-fe612bf48a46789cc7e4a4c1e637fe17d2796a97.zip
Return target_info from ntlm_decode_auth_msg
The target_info structure embedded in the NT Response message in NTLMv2 contains information needed to establish if the client has sent a valid MIC. So we need to extract and return it if the caller requested it. Also moves some wire structures definitions in common to be able to reuse them.
Diffstat (limited to 'src/ntlm_crypto.c')
-rw-r--r--src/ntlm_crypto.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/ntlm_crypto.c b/src/ntlm_crypto.c
index 5bccb39..f3701db 100644
--- a/src/ntlm_crypto.c
+++ b/src/ntlm_crypto.c
@@ -33,35 +33,6 @@
#include "ntlm.h"
#include "crypto.h"
-/* ntlm response, v1 or v2 */
-#pragma pack(push, 1)
-union wire_ntlm_response {
- struct {
- uint8_t resp[24];
- } v1;
- struct {
- uint8_t resp[16];
- uint8_t cli_chal[];
- } v2;
-};
-#pragma pack(pop)
-
-#pragma pack(push, 1)
-struct wire_ntlmv2_cli_chal {
- uint8_t resp_version;
- uint8_t hi_resp_version;
- uint8_t zero_6[6];
- uint64_t timestamp;
- uint8_t client_chal[8];
- uint8_t zero_4[4];
- uint8_t target_info[];
- /* NOTE: the target_info array must terminate with 4 zero bytes.
- * This is consistent with just copying the target_info array
- * returned in the challenge message as the last AV_PAIR there is
- * always MSV_AV_EOL which happens to be 4 bytes of zeros */
-};
-#pragma pack(pop)
-
/* signature structure, v1 or v2 */
#pragma pack(push, 1)
union wire_msg_signature {