Return an error if attribute context initialisation fails
[mech_eap.orig] / wrap.c
diff --git a/wrap.c b/wrap.c
index 0407a33..2dd9031 100644 (file)
--- a/wrap.c
+++ b/wrap.c
  * SUCH DAMAGE.
  */
 
+/*
+ * Message protection services: wrap.
+ */
+
 #include "gssapiP_eap.h"
 
 OM_uint32
@@ -54,6 +58,7 @@ gss_wrap(OM_uint32 *minor,
 
     if (!CTX_IS_ESTABLISHED(ctx)) {
         major = GSS_S_NO_CONTEXT;
+        *minor = GSSEAP_CONTEXT_INCOMPLETE;
         goto cleanup;
     }