correct pointer error in gsseap_set_cred_flag example
[mech_eap.orig] / verify_mic.c
index 7eeefd1..0a56949 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * 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;