wolfSSL: More complete crypto_ec_key_group()

Add more curves and check if brainpool support is built.

Signed-off-by: Juliusz Sosinowicz <juliusz@wolfssl.com>
This commit is contained in:
Juliusz Sosinowicz 2023-03-08 18:18:48 +01:00 committed by Jouni Malinen
parent d48f6b9138
commit de38571b86

View file

@ -2110,12 +2110,20 @@ int crypto_ec_key_group(struct crypto_ec_key *key)
return 20; return 20;
case ECC_SECP521R1: case ECC_SECP521R1:
return 21; return 21;
case ECC_SECP192R1:
return 25;
case ECC_SECP224R1:
return 26;
#ifdef HAVE_ECC_BRAINPOOL
case ECC_BRAINPOOLP224R1:
return 27;
case ECC_BRAINPOOLP256R1: case ECC_BRAINPOOLP256R1:
return 28; return 28;
case ECC_BRAINPOOLP384R1: case ECC_BRAINPOOLP384R1:
return 29; return 29;
case ECC_BRAINPOOLP512R1: case ECC_BRAINPOOLP512R1:
return 30; return 30;
#endif /* HAVE_ECC_BRAINPOOL */
} }
LOG_WOLF_ERROR_VA("Unsupported curve (id=%d) in EC key", LOG_WOLF_ERROR_VA("Unsupported curve (id=%d) in EC key",