From c638fd50c881b4baccc555a970e61fee04e1a599 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 22 Feb 2019 14:48:44 -0600 Subject: [PATCH] unit: Add IWD_TLS_DEBUG environment variable handling --- unit/test-eapol.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/unit/test-eapol.c b/unit/test-eapol.c index b5b0a2c2..b2371bce 100644 --- a/unit/test-eapol.c +++ b/unit/test-eapol.c @@ -67,6 +67,11 @@ static const uint8_t *aa; /* Supplicant Address */ static const uint8_t *spa; +static void tls_debug(const char *str, void *user_data) +{ + l_info("%s", str); +} + struct test_handshake_state { struct handshake_state super; const uint8_t *tk; @@ -2934,6 +2939,9 @@ static void eapol_sm_test_tls(struct eapol_8021x_tls_test_state *s, s->ready_cb, s->disconnect_cb, s); assert(s->tls); + if (getenv("IWD_TLS_DEBUG")) + l_tls_set_debug(s->tls, tls_debug, NULL, NULL); + s->last_id = 1; s->success = false; s->tx_buf_len = 0;