diff options
author | Simo Sorce <simo@redhat.com> | 2014-04-05 15:20:06 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-05-04 17:21:06 -0400 |
commit | 6c31661097c7aac2729ed2a5a6e3a8856b5ae15c (patch) | |
tree | 4c242ae9c091db40d60581148cf70ca66cf3597b /src/ntlm.h | |
parent | c867bc34147832923360c5b6ca6cc35200dfdbe8 (diff) | |
download | gss-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.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 ############## */ /** |