Updated through tag hostap_2_5 from git://w1.fi/hostap.git
[mech_eap.git] / libeap / src / eap_server / eap_server_identity.c
index cd8da2a..4501533 100644 (file)
@@ -2,14 +2,8 @@
  * hostapd / EAP-Identity
  * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "includes.h"
@@ -108,6 +102,7 @@ static void eap_identity_process(struct eap_sm *sm, void *priv,
        struct eap_identity_data *data = priv;
        const u8 *pos;
        size_t len;
+       char *buf;
 
        if (data->pick_up) {
                if (eap_identity_check(sm, data, respData)) {
@@ -125,6 +120,12 @@ static void eap_identity_process(struct eap_sm *sm, void *priv,
                return; /* Should not happen - frame already validated */
 
        wpa_hexdump_ascii(MSG_DEBUG, "EAP-Identity: Peer identity", pos, len);
+       buf = os_malloc(len * 4 + 1);
+       if (buf) {
+               printf_encode(buf, len * 4 + 1, pos, len);
+               eap_log_msg(sm, "EAP-Response/Identity '%s'", buf);
+               os_free(buf);
+       }
        if (sm->identity)
                sm->update_user = TRUE;
        os_free(sm->identity);