gsupplicant: Client certificate is not mandatory for TTLS/PEAP
authorPaolo Pellegrino <paolo.pellegrino@zirak.it>
Fri, 17 Jun 2011 14:20:26 +0000 (16:20 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 17 Jun 2011 14:20:26 +0000 (16:20 +0200)
gsupplicant/supplicant.c

index 485b671..bbb04ae 100644 (file)
@@ -2633,7 +2633,7 @@ static void add_network_security_peap(DBusMessageIter *dict,
         *              The 2nd phase authentication method
         *              The 2nd phase passphrase
         *
-        * The Client certificate is optional although strongly required
+        * The Client certificate is optional although strongly recommended
         * When setting it, we need in addition
         *              The Client private key file
         *              The Client private key file password
@@ -2641,9 +2641,6 @@ static void add_network_security_peap(DBusMessageIter *dict,
        if (ssid->passphrase == NULL)
                return;
 
-       if (ssid->ca_cert_path == NULL)
-               return;
-
        if (ssid->phase2_auth == NULL)
                return;
 
@@ -2678,7 +2675,8 @@ static void add_network_security_peap(DBusMessageIter *dict,
                                                DBUS_TYPE_STRING,
                                                &ssid->passphrase);
 
-       supplicant_dbus_dict_append_basic(dict, "ca_cert",
+       if (ssid->ca_cert_path)
+               supplicant_dbus_dict_append_basic(dict, "ca_cert",
                                                DBUS_TYPE_STRING,
                                                &ssid->ca_cert_path);