mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-29 17:54:21 +01:00
Undo API change
The previous commit b3e6872c93
changed
to public functions from ssl_ciphersuite.h to static inline. This
commit reverts this change.
This commit is contained in:
parent
3fb1cc37a6
commit
499391a02d
@ -355,23 +355,8 @@ mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_pk_alg( const mbedtls_ssl_ciph
|
|||||||
mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg( const mbedtls_ssl_ciphersuite_t *info );
|
mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg( const mbedtls_ssl_ciphersuite_t *info );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
|
int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info );
|
||||||
static inline int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info )
|
int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info );
|
||||||
{
|
|
||||||
switch( info->key_exchange )
|
|
||||||
{
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
|
|
||||||
return( 1 );
|
|
||||||
|
|
||||||
default:
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE__SOME_PFS__ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE__SOME_PFS__ENABLED)
|
||||||
static inline int mbedtls_ssl_ciphersuite_has_pfs( const mbedtls_ssl_ciphersuite_t *info )
|
static inline int mbedtls_ssl_ciphersuite_has_pfs( const mbedtls_ssl_ciphersuite_t *info )
|
||||||
@ -424,23 +409,6 @@ static inline int mbedtls_ssl_ciphersuite_uses_ecdh( const mbedtls_ssl_ciphersui
|
|||||||
}
|
}
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE__SOME__ECDH_ENABLED */
|
#endif /* MBEDTLS_KEY_EXCHANGE__SOME__ECDH_ENABLED */
|
||||||
|
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
|
|
||||||
static inline int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info )
|
|
||||||
{
|
|
||||||
switch( info->key_exchange )
|
|
||||||
{
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_PSK:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_DHE_PSK:
|
|
||||||
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
|
|
||||||
return( 1 );
|
|
||||||
|
|
||||||
default:
|
|
||||||
return( 0 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */
|
|
||||||
|
|
||||||
static inline int mbedtls_ssl_ciphersuite_cert_req_allowed( const mbedtls_ssl_ciphersuite_t *info )
|
static inline int mbedtls_ssl_ciphersuite_cert_req_allowed( const mbedtls_ssl_ciphersuite_t *info )
|
||||||
{
|
{
|
||||||
switch( info->key_exchange )
|
switch( info->key_exchange )
|
||||||
|
@ -1814,6 +1814,42 @@ mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg( const mbedtls_ssl_ciphers
|
|||||||
return( MBEDTLS_PK_NONE );
|
return( MBEDTLS_PK_NONE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MBEDTLS_PK_C */
|
#endif /* MBEDTLS_PK_C */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)
|
||||||
|
int mbedtls_ssl_ciphersuite_uses_ec( const mbedtls_ssl_ciphersuite_t *info )
|
||||||
|
{
|
||||||
|
switch( info->key_exchange )
|
||||||
|
{
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_ECDH_RSA:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA:
|
||||||
|
return( 1 );
|
||||||
|
|
||||||
|
default:
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
|
||||||
|
int mbedtls_ssl_ciphersuite_uses_psk( const mbedtls_ssl_ciphersuite_t *info )
|
||||||
|
{
|
||||||
|
switch( info->key_exchange )
|
||||||
|
{
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_PSK:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_RSA_PSK:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_DHE_PSK:
|
||||||
|
case MBEDTLS_KEY_EXCHANGE_ECDHE_PSK:
|
||||||
|
return( 1 );
|
||||||
|
|
||||||
|
default:
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED */
|
||||||
|
|
||||||
#endif /* MBEDTLS_SSL_TLS_C */
|
#endif /* MBEDTLS_SSL_TLS_C */
|
||||||
|
Loading…
Reference in New Issue
Block a user