]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: More debug for own connector configuration errors
authorJouni Malinen <jouni@qca.qualcomm.com>
Sun, 2 Jul 2017 09:36:11 +0000 (12:36 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 2 Jul 2017 06:35:00 +0000 (09:35 +0300)
This makes it easier to notice a reason for failure in cases a connector
string has been truncated.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/dpp.c

index f564929ffb4531b2638d7ef443820bf45bc92e9e..bfc0fde27e53020cef8d8cc5edc581c88c48ca61 100644 (file)
@@ -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) {