always encode EAP usernames as ID_KEY_ID
authorMartin Willi <martin@strongswan.org>
Wed, 18 Feb 2009 15:03:33 +0000 (15:03 -0000)
committerMartin Willi <martin@strongswan.org>
Wed, 18 Feb 2009 15:03:33 +0000 (15:03 -0000)
src/charon/plugins/nm/nm_service.c

index f90bfa4..1f2b6f7 100644 (file)
@@ -223,7 +223,8 @@ static gboolean connect_(NMVPNPlugin *plugin, NMConnection *connection,
                str = g_hash_table_lookup(settings->data, "user");
                if (str)
                {
-                       user = identification_create_from_string(str);
+                       user = identification_create_from_encoding(ID_KEY_ID,
+                                                                                       chunk_create(str, strlen(str)));
                        str = g_hash_table_lookup(settings->secrets, "password");
                        creds->set_username_password(creds, user, str);
                }