add some function headers
[mech_eap.git] / get_mic.c
index 45c96ec..172e21a 100644 (file)
--- a/get_mic.c
+++ b/get_mic.c
  * SUCH DAMAGE.
  */
 
+/*
+ * Message protection services: make a message integerity check.
+ */
+
 #include "gssapiP_eap.h"
 
 OM_uint32
 gss_get_mic(OM_uint32 *minor,
             gss_ctx_id_t ctx,
-            gss_qop_t qop_req __attribute__((__unused__)),
+            gss_qop_t qop_req,
             gss_buffer_t message_buffer,
             gss_buffer_t message_token)
 {
@@ -47,6 +51,11 @@ gss_get_mic(OM_uint32 *minor,
         return GSS_S_NO_CONTEXT;
     }
 
+    if (qop_req != GSS_C_QOP_DEFAULT) {
+        *minor = GSSEAP_UNKNOWN_QOP;
+        return GSS_S_UNAVAILABLE;
+    }
+
     *minor = 0;
 
     message_token->value = NULL;