From 43fbb8db5bd504eefaa543b519472e507e07f2c5 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 2 Jul 2017 12:36:11 +0300 Subject: [PATCH] DPP: More debug for own connector configuration errors This makes it easier to notice a reason for failure in cases a connector string has been truncated. Signed-off-by: Jouni Malinen --- src/common/dpp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/dpp.c b/src/common/dpp.c index f564929ff..bfc0fde27 100644 --- a/src/common/dpp.c +++ b/src/common/dpp.c @@ -4522,12 +4522,16 @@ int dpp_peer_intro(struct dpp_introduction *intro, const char *own_connector, own_deviceid); pos = os_strchr(own_connector, '.'); - if (!pos) + if (!pos) { + wpa_printf(MSG_DEBUG, "DPP: Own connector is missing the first dot (.)"); goto fail; + } pos++; end = os_strchr(pos, '.'); - if (!end) + if (!end) { + wpa_printf(MSG_DEBUG, "DPP: Own connector is missing the second dot (.)"); goto fail; + } own_conn = base64_url_decode((const unsigned char *) pos, end - pos, &own_conn_len); if (!own_conn) {