]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: AP parameters for DPP AKM
authorJouni Malinen <jouni@qca.qualcomm.com>
Sun, 18 Jun 2017 14:29:57 +0000 (17:29 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 19 Jun 2017 18:13:17 +0000 (21:13 +0300)
Extend hostapd configuration to include parameters needed for the DPP
AKM: dpp_connector, dpp_netaccesskey, dpp_netaccesskey_expiry,
dpp_csign, dpp_csign_expiry.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd/config_file.c
src/ap/ap_config.c
src/ap/ap_config.h

index 0924d41cc1cbe1af23c7cd1453d6ba6993fa87a8..0955f91402d6e24774a34e1c981cd01758530f3f 100644 (file)
@@ -3719,6 +3719,21 @@ static int hostapd_config_fill(struct hostapd_config *conf,
                bss->multicast_to_unicast = atoi(pos);
        } else if (os_strcmp(buf, "broadcast_deauth") == 0) {
                bss->broadcast_deauth = atoi(pos);
+#ifdef CONFIG_DPP
+       } else if (os_strcmp(buf, "dpp_connector") == 0) {
+               os_free(bss->dpp_connector);
+               bss->dpp_connector = os_strdup(pos);
+       } else if (os_strcmp(buf, "dpp_netaccesskey") == 0) {
+               if (parse_wpabuf_hex(line, buf, &bss->dpp_netaccesskey, pos))
+                       return 1;
+       } else if (os_strcmp(buf, "dpp_netaccesskey_expiry") == 0) {
+               bss->dpp_netaccesskey_expiry = strtol(pos, NULL, 0);
+       } else if (os_strcmp(buf, "dpp_csign") == 0) {
+               if (parse_wpabuf_hex(line, buf, &bss->dpp_csign, pos))
+                       return 1;
+       } else if (os_strcmp(buf, "dpp_csign_expiry") == 0) {
+               bss->dpp_csign_expiry = strtol(pos, NULL, 0);
+#endif /* CONFIG_DPP */
        } else {
                wpa_printf(MSG_ERROR,
                           "Line %d: unknown configuration item '%s'",
index 09cbec3b337bb47b58fce82b5aa55e1b857f64b1..f96d7428d4be5f4d6d4bccd67d8cde0574c9b972 100644 (file)
@@ -624,6 +624,12 @@ void hostapd_config_free_bss(struct hostapd_bss_config *conf)
 
        hostapd_config_free_fils_realms(conf);
 
+#ifdef CONFIG_DPP
+       os_free(conf->dpp_connector);
+       wpabuf_free(conf->dpp_netaccesskey);
+       wpabuf_free(conf->dpp_csign);
+#endif /* CONFIG_DPP */
+
        os_free(conf);
 }
 
index 9fb0a003c2179db9337e7dcbf0daab62c5d2fc46..fa2ae49bcec0e8879e0c0053b551b2804813080f 100644 (file)
@@ -625,6 +625,14 @@ struct hostapd_bss_config {
        int multicast_to_unicast;
 
        int broadcast_deauth;
+
+#ifdef CONFIG_DPP
+       char *dpp_connector;
+       struct wpabuf *dpp_netaccesskey;
+       unsigned int dpp_netaccesskey_expiry;
+       struct wpabuf *dpp_csign;
+       unsigned int dpp_csign_expiry;
+#endif /* CONFIG_DPP */
 };
 
 /**