[RFC] supplicant/interworking: Allow EAP-TLS without user specified.

greearb at candelatech.com greearb
Thu Sep 19 16:44:10 PDT 2013


From: Ben Greear <greearb at candelatech.com>

It appears that it is not required for the user to specify the
user-name when using EAP-TLS.  The user-name could instead come
from the PCSC logic??

Signed-hostap: Ben Greear <greearb at candelatech.com>
---
:100644 100644 cb48766... c95224b... M	wpa_supplicant/interworking.c
 wpa_supplicant/interworking.c |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/wpa_supplicant/interworking.c b/wpa_supplicant/interworking.c
index cb48766..c95224b 100644
--- a/wpa_supplicant/interworking.c
+++ b/wpa_supplicant/interworking.c
@@ -572,13 +572,16 @@ static struct nai_realm_eap * nai_realm_find_eap(struct wpa_cred *cred,
 {
 	u8 e;
 
-	if (cred == NULL ||
-	    cred->username == NULL ||
-	    cred->username[0] == '\0' ||
-	    ((cred->password == NULL ||
-	      cred->password[0] == '\0') &&
-	     (cred->private_key == NULL ||
-	      cred->private_key[0] == '\0')))
+	if (cred == NULL)
+		return NULL;
+
+	/* If we have neither private key nor user + password, bail out now */
+	if ((cred->username == NULL ||
+	     cred->username[0] == '\0' ||
+	     cred->password == NULL ||
+	     cred->password[0] == '\0') &&
+	    (cred->private_key == NULL ||
+	     cred->private_key[0] == '\0'))
 		return NULL;
 
 	for (e = 0; e < realm->eap_count; e++) {
-- 
1.7.3.4




More information about the Hostap mailing list