Merge branch 'master' of ssh://moonshot.suchdamage.org:822/srv/git/moonshot
[mech_eap.orig] / verify_mic.c
index 7eeefd1..5df6b52 100644 (file)
  * SUCH DAMAGE.
  */
 
+/*
+ * Message protection services: verify a message integrity check.
+ */
+
 #include "gssapiP_eap.h"
 
 OM_uint32
@@ -44,10 +48,12 @@ gss_verify_mic(OM_uint32 *minor,
     int conf_state;
 
     if (message_token->length < 16) {
-        *minor = KRB5_BAD_MSIZE;
+        *minor = GSSEAP_TOK_TRUNC;
         return GSS_S_BAD_SIG;
     }
 
+    *minor = 0;
+
     iov[0].type = GSS_IOV_BUFFER_TYPE_DATA;
     iov[0].buffer = *message_buffer;