mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-24 01:05:41 +00:00
TinyCrypt SSL: Extend scope of TC-based SrvKeyExch writing
Previously, TinyCrypt was only used for ECDHE-ECDSA/RSA ciphersuites. This commit is a step towards using it for _all_ ciphersuites involving ECDHE (specifically: ECDHE, ECDHE-PSK, static ECDH), extending the scope of the use of TinyCrypt in the writing of the ServerKeyExchange message.
This commit is contained in:
parent
b3a244847d
commit
8ea7da2250
|
@ -3415,10 +3415,6 @@ static int ssl_prepare_server_key_exchange( mbedtls_ssl_context *ssl,
|
|||
*/
|
||||
|
||||
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||
if( mbedtls_ssl_suite_get_key_exchange( ciphersuite_info )
|
||||
== MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA ||
|
||||
mbedtls_ssl_suite_get_key_exchange( ciphersuite_info )
|
||||
== MBEDTLS_KEY_EXCHANGE_ECDHE_RSA )
|
||||
{
|
||||
static const unsigned char ecdh_param_hdr[] = {
|
||||
MBEDTLS_SSL_EC_TLS_NAMED_CURVE,
|
||||
|
@ -3446,13 +3442,6 @@ static int ssl_prepare_server_key_exchange( mbedtls_ssl_context *ssl,
|
|||
|
||||
ssl->out_msglen += 2*NUM_ECC_BYTES;
|
||||
}
|
||||
else
|
||||
#endif /* MBEDTLS_TINYCRYPT_C */
|
||||
#if !defined(MBEDTLS_ECDH_C)
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||
}
|
||||
#else
|
||||
{
|
||||
const mbedtls_ecp_curve_info *curve =
|
||||
|
|
Loading…
Reference in a new issue