]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Allow Controller to be configured to require QR mutual auth
authorJouni Malinen <jouni@codeaurora.org>
Wed, 12 Aug 2020 08:41:52 +0000 (11:41 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 12 Aug 2020 08:41:52 +0000 (11:41 +0300)
Extend the DPP_CONTROLLER_START command to accept the optional qr=mutual
parameter similarly to the DPP_LISTEN case.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/dpp.h
src/common/dpp_tcp.c
wpa_supplicant/dpp_supplicant.c

index 8243a97b62c227e139c72e2fd3edfbce9a46d51d..feee8e1e843c9bd14258f95e338919b5eb4aef16 100644 (file)
@@ -384,6 +384,7 @@ struct dpp_controller_config {
        const char *configurator_params;
        int tcp_port;
        u8 allowed_roles;
+       int qr_mutual;
 };
 
 #ifdef CONFIG_TESTING_OPTIONS
index 33874400ecb1f6b9c1891381f1661152b66b85ce..53fe67f81444fb9a12a3bbd7a9a17a90a9a4527a 100644 (file)
@@ -1622,7 +1622,7 @@ int dpp_controller_start(struct dpp_global *dpp,
                        os_strdup(config->configurator_params);
        dl_list_init(&ctrl->conn);
        ctrl->allowed_roles = config->allowed_roles;
-       ctrl->qr_mutual = 0;
+       ctrl->qr_mutual = config->qr_mutual;
 
        ctrl->sock = socket(AF_INET, SOCK_STREAM, 0);
        if (ctrl->sock < 0)
index 224c40b9be33c9d113c9795efcea7ea588ccb772..3119445ac028ac927dbc833d4f0b907e48ae251d 100644 (file)
@@ -3350,6 +3350,8 @@ int wpas_dpp_controller_start(struct wpa_supplicant *wpa_s, const char *cmd)
                        else
                                return -1;
                }
+
+               config.qr_mutual = os_strstr(cmd, " qr=mutual") != NULL;
        }
        config.configurator_params = wpa_s->dpp_configurator_params;
        return dpp_controller_start(wpa_s->dpp, &config);