summaryrefslogtreecommitdiffstats
path: root/src/ntlm.h
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-04-05 15:20:06 -0400
committerSimo Sorce <simo@redhat.com>2014-05-04 17:21:06 -0400
commit6c31661097c7aac2729ed2a5a6e3a8856b5ae15c (patch)
tree4c242ae9c091db40d60581148cf70ca66cf3597b /src/ntlm.h
parentc867bc34147832923360c5b6ca6cc35200dfdbe8 (diff)
downloadgss-ntlmssp-6c31661097c7aac2729ed2a5a6e3a8856b5ae15c.tar.gz
gss-ntlmssp-6c31661097c7aac2729ed2a5a6e3a8856b5ae15c.tar.xz
gss-ntlmssp-6c31661097c7aac2729ed2a5a6e3a8856b5ae15c.zip
Add function to verify MICs
Diffstat (limited to 'src/ntlm.h')
-rw-r--r--src/ntlm.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ntlm.h b/src/ntlm.h
index 40508e4..72d62c8 100644
--- a/src/ntlm.h
+++ b/src/ntlm.h
@@ -430,6 +430,26 @@ int ntlm_mic(struct ntlm_key *exported_session_key,
struct ntlm_buffer *authenticate_message,
struct ntlm_buffer *mic);
+/**
+ * @brief Verifies a MIC
+ *
+ * @param key The keys used to generate the original MIC
+ * @param negotiate_message The NTLM Negotiate Message (or empty)
+ * @param challenge_message The NTLM Challenge Message
+ * @param authenticate_message The NTLM Authenticate Message
+ * @param mic The original MIC
+ *
+ * NOTE: This function zeros the area of memory where the MIC is held in the
+ * Authenticate Message
+ *
+ * @return 0 on success, EACCES if the MIC fails to verify, or an error
+ */
+int ntlm_verify_mic(struct ntlm_key *key,
+ struct ntlm_buffer *negotiate_message,
+ struct ntlm_buffer *challenge_message,
+ struct ntlm_buffer *authenticate_message,
+ struct ntlm_buffer *mic);
+
/* ############## ENCODING / DECODING ############## */
/**