diff --git a/src/config.c b/src/config.c index bf8ca44af3bc7145b379b7772b1380fd00e64c74..29463479c32148494c14e64fee7506c07ea5fb30 100644 --- a/src/config.c +++ b/src/config.c @@ -109,6 +109,10 @@ static int uci_update_section_ap(const char *config, struct i1905_apconfig *ap) uci_add_option(ctx, pkg, sec, "key", ap->key, false); if (ap->auth_type == 0x0020) /* WPS_AUTH_WPA2PSK */ uci_add_option(ctx, pkg, sec, "encryption", "psk2", false); + else if (ap->auth_type == 0x0040) /* WPS_AUTH_SAE */ + uci_add_option(ctx, pkg, sec, "encryption", "sae", false); + else if (ap->auth_type == 0x0060) + uci_add_option(ctx, pkg, sec, "encryption", "sae-mixed", false); uci_commit(ctx, &pkg, false); uci_free_context(ctx); @@ -300,6 +304,12 @@ static int i1905_config_get_ap(struct i1905_config *cfg, struct uci_section *s) if (strstr(val, "psk2")) { ap->auth_type = 0x0020; /* WPS_AUTH_WPA2PSK */ ap->enc_type = 0x0008; /* WPS_ENCR_AES */ + } else if (strstr(val, "sae-mixed")) { + ap->auth_type = 0x0060; /* WPS_AUTH_SAE | WPS_AUTH_WPA2PSK */ + ap->enc_type = 0x0008; /* WPS_ENCR_AES */ + } else if (strstr(val, "sae")) { + ap->auth_type = 0x0040; /* WPS_AUTH_SAE */ + ap->enc_type = 0x0008; /* WPS_ENCR_AES */ } else { free(ap); fprintf(stderr, "Unsupported ap encryption in config\n"); diff --git a/src/i1905_wsc.h b/src/i1905_wsc.h index d8bf5090f370ab1388dca8b14f3eff4323293c5b..ab10715140c8aee54e1401ca86ee12c9a837a5f3 100644 --- a/src/i1905_wsc.h +++ b/src/i1905_wsc.h @@ -30,11 +30,14 @@ #define ATTR_PUBLIC_KEY (0x1032) #define ATTR_AUTH_TYPE_FLAGS (0x1004) #define WPS_AUTH_OPEN (0x0001) -#define WPS_AUTH_WPAPSK (0x0002) +#define WPS_AUTH_WPAPSK (0x0002) /* deprecated */ #define WPS_AUTH_SHARED (0x0004) /* deprecated */ -#define WPS_AUTH_WPA (0x0008) +#define WPS_AUTH_WPA (0x0008) /* deprecated */ #define WPS_AUTH_WPA2 (0x0010) #define WPS_AUTH_WPA2PSK (0x0020) +#define WPS_AUTH_SAE (0x0040) +#define WPS_AUTH_WPA3_T (WPS_AUTH_WPA2PSK | WPS_AUTH_SAE) + #define ATTR_ENCR_TYPE_FLAGS (0x1010) #define WPS_ENCR_NONE (0x0001) #define WPS_ENCR_WEP (0x0002) /* deprecated */