aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-03-01 22:07:50 (GMT)
committerJouni Malinen <j@w1.fi>2014-03-09 16:21:13 (GMT)
commit994afe3390695400ea63df5533c1dd9d8c2ccbd4 (patch)
tree2f771a2376fa2246a083bd9e3132e710321a2889 /src/eap_server
parent01f7fe10ef4b39e056ebc4d0756129919fb7eb53 (diff)
downloadhostap-994afe3390695400ea63df5533c1dd9d8c2ccbd4.zip
hostap-994afe3390695400ea63df5533c1dd9d8c2ccbd4.tar.gz
hostap-994afe3390695400ea63df5533c1dd9d8c2ccbd4.tar.bz2
RADIUS server: Allow TLS implementation add log entries
This allows the internal TLS implementation to write log entries to the same authlog with rest of the RADIUS server and EAP server functionality. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_server')
-rw-r--r--src/eap_server/eap_server_tls_common.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/eap_server/eap_server_tls_common.c b/src/eap_server/eap_server_tls_common.c
index de5ab0d..0afb44b 100644
--- a/src/eap_server/eap_server_tls_common.c
+++ b/src/eap_server/eap_server_tls_common.c
@@ -34,6 +34,15 @@ struct wpabuf * eap_tls_msg_alloc(EapType type, size_t payload_len,
}
+#ifdef CONFIG_TLS_INTERNAL
+static void eap_server_tls_log_cb(void *ctx, const char *msg)
+{
+ struct eap_sm *sm = ctx;
+ eap_log_msg(sm, "TLS: %s", msg);
+}
+#endif /* CONFIG_TLS_INTERNAL */
+
+
int eap_server_tls_ssl_init(struct eap_sm *sm, struct eap_ssl_data *data,
int verify_peer)
{
@@ -52,6 +61,10 @@ int eap_server_tls_ssl_init(struct eap_sm *sm, struct eap_ssl_data *data,
return -1;
}
+#ifdef CONFIG_TLS_INTERNAL
+ tls_connection_set_log_cb(data->conn, eap_server_tls_log_cb, sm);
+#endif /* CONFIG_TLS_INTERNAL */
+
if (tls_connection_set_verify(sm->ssl_ctx, data->conn, verify_peer)) {
wpa_printf(MSG_INFO, "SSL: Failed to configure verification "
"of TLS peer certificate");