Allow zero length but non-NULL tokens on init_sec_context
authorLuke Howard <lukeh@padl.com>
Sun, 2 Jan 2011 07:33:38 +0000 (18:33 +1100)
committerLuke Howard <lukeh@padl.com>
Sun, 2 Jan 2011 07:33:38 +0000 (18:33 +1100)
init_sec_context.c

index bc3f554..b46f981 100644 (file)
@@ -730,7 +730,7 @@ gss_init_sec_context(OM_uint32 *minor,
 
     sm = &eapGssInitiatorSm[ctx->state];
 
-    if (input_token != GSS_C_NO_BUFFER) {
+    if (input_token != GSS_C_NO_BUFFER && input_token->length != 0) {
         major = gssEapVerifyToken(minor, ctx, input_token,
                                   &tokType, &innerInputToken);
         if (GSS_ERROR(major))