]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Enterprise provisioning definitions for dot1x AKM
authorJouni Malinen <jouni@codeaurora.org>
Mon, 15 Jun 2020 17:20:50 +0000 (20:20 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 16 Jun 2020 15:24:23 +0000 (18:24 +0300)
Add shared AKM definitions for provisioning enterprise (EAP-TLS)
credentials.

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

index ca3b8b50ccdbe39bb703fd01e150b7bcea03b9ae..2ca9062834e4f109629e2bc2ad3f6b890dfebcb5 100644 (file)
@@ -916,6 +916,8 @@ struct dpp_configuration * dpp_configuration_alloc(const char *type)
                conf->akm = DPP_AKM_PSK_SAE_DPP;
        else if (bin_str_eq(type, len, "dpp"))
                conf->akm = DPP_AKM_DPP;
+       else if (bin_str_eq(type, len, "dot1x"))
+               conf->akm = DPP_AKM_DOT1X;
        else
                goto fail;
 
@@ -2371,6 +2373,8 @@ const char * dpp_akm_str(enum dpp_akm akm)
                return "dpp+sae";
        case DPP_AKM_PSK_SAE_DPP:
                return "dpp+psk+sae";
+       case DPP_AKM_DOT1X:
+               return "dot1x";
        default:
                return "??";
        }
@@ -2392,6 +2396,8 @@ const char * dpp_akm_selector_str(enum dpp_akm akm)
                return "506F9A02+000FAC08";
        case DPP_AKM_PSK_SAE_DPP:
                return "506F9A02+000FAC08+000FAC02+000FAC06";
+       case DPP_AKM_DOT1X:
+               return "000FAC01+000FAC05";
        default:
                return "??";
        }
@@ -2401,7 +2407,7 @@ const char * dpp_akm_selector_str(enum dpp_akm akm)
 static enum dpp_akm dpp_akm_from_str(const char *akm)
 {
        const char *pos;
-       int dpp = 0, psk = 0, sae = 0;
+       int dpp = 0, psk = 0, sae = 0, dot1x = 0;
 
        if (os_strcmp(akm, "psk") == 0)
                return DPP_AKM_PSK;
@@ -2415,6 +2421,8 @@ static enum dpp_akm dpp_akm_from_str(const char *akm)
                return DPP_AKM_SAE_DPP;
        if (os_strcmp(akm, "dpp+psk+sae") == 0)
                return DPP_AKM_PSK_SAE_DPP;
+       if (os_strcmp(akm, "dot1x") == 0)
+               return DPP_AKM_DOT1X;
 
        pos = akm;
        while (*pos) {
@@ -2428,6 +2436,10 @@ static enum dpp_akm dpp_akm_from_str(const char *akm)
                        psk = 1;
                else if (os_strncasecmp(pos, "000FAC08", 8) == 0)
                        sae = 1;
+               else if (os_strncasecmp(pos, "000FAC01", 8) == 0)
+                       dot1x = 1;
+               else if (os_strncasecmp(pos, "000FAC05", 8) == 0)
+                       dot1x = 1;
                pos += 8;
                if (*pos != '+')
                        break;
@@ -2446,6 +2458,8 @@ static enum dpp_akm dpp_akm_from_str(const char *akm)
                return DPP_AKM_SAE;
        if (psk)
                return DPP_AKM_PSK;
+       if (dot1x)
+               return DPP_AKM_DOT1X;
 
        return DPP_AKM_UNKNOWN;
 }
index c0927d9b84712769fcd4c7a11b1c84b5afe7ead4..c430c28562075eb26c02494dda554f8365656059 100644 (file)
@@ -196,6 +196,7 @@ enum dpp_akm {
        DPP_AKM_PSK_SAE,
        DPP_AKM_SAE_DPP,
        DPP_AKM_PSK_SAE_DPP,
+       DPP_AKM_DOT1X,
 };
 
 enum dpp_netrole {