commit c638fd50c881b4baccc555a970e61fee04e1a599
parent 7b3831515a729698d2d423394527002c41023dba
Author: Denis Kenzior <denkenz@gmail.com>
Date: Fri, 22 Feb 2019 14:48:44 -0600
unit: Add IWD_TLS_DEBUG environment variable handling
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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;