check we have an initiator credential
authorLuke Howard <lukeh@padl.com>
Fri, 24 Sep 2010 12:02:29 +0000 (14:02 +0200)
committerLuke Howard <lukeh@padl.com>
Fri, 24 Sep 2010 12:02:29 +0000 (14:02 +0200)
init_sec_context.c

index e3b4d63..d538556 100644 (file)
@@ -212,6 +212,14 @@ peerConfigInit(OM_uint32 *minor,
     krb5_error_code code;
     char *identity;
 
+    eapPeerConfig->identity = NULL;
+    eapPeerConfig->identity_len = 0;
+    eapPeerConfig->password = NULL;
+    eapPeerConfig->password_len = 0;
+
+    if (cred == GSS_C_NO_CREDENTIAL)
+        return GSS_S_NO_CRED;
+
     GSSEAP_KRB_INIT(&krbContext);
 
     eapPeerConfig->fragment_size = 1024;