mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-05 06:26:52 +00:00
Fixup: Don't reference legacy ECP curve identifier in config.h
TinyCrypt should be used as a replacement of legacy ECC. In particular, there shouldn't be any use of identifiers from the legacy ECC module. So far, there's the configuration option MBEDTLS_SSL_CONF_SINGLE_EC_GRP_ID that's relevant if MBEDTLS_SSL_CONF_SINGLE_CURVE is set, and which in this case must resolve to an identifier of type mbedtls_ecp_group_id indicating which single curve to enable. With the introduction of TinyCrypt, we must either change the type of this option to mbedtls_uecc_group_id, or introduce a separate compilation option. In order to avoid type confusion, this commit follows tha latter approach, introducing the configuration option MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID that indicatesthe TinyCrypt group identifier of the single curve to use (must be Secp256r1) if MBEDTLS_SSL_CONF_SINGLE_CURVE and MBEDTLS_USE_TINYCRYPT are set.
This commit is contained in:
parent
8d49ba3b78
commit
49ac40b81b
3 changed files with 14 additions and 3 deletions
|
|
@ -2866,6 +2866,14 @@ int query_config( const char *config )
|
|||
}
|
||||
#endif /* MBEDTLS_SSL_CONF_SINGLE_EC_GRP_ID */
|
||||
|
||||
#if defined(MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID)
|
||||
if( strcmp( "MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID", config ) == 0 )
|
||||
{
|
||||
MACRO_EXPANSION_TO_STR( MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID );
|
||||
return( 0 );
|
||||
}
|
||||
#endif /* MBEDTLS_SSL_CONF_SINGLE_UECC_GRP_ID */
|
||||
|
||||
#if defined(MBEDTLS_SSL_CONF_SINGLE_SIG_HASH)
|
||||
if( strcmp( "MBEDTLS_SSL_CONF_SINGLE_SIG_HASH", config ) == 0 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue