Merge pull request #5695 from mprse/tls_1_3_remove_redundant_check
ssl_tls13_generate_and_write_ecdh_key_exchange(): remove redundant check
This commit is contained in:
commit
fff641a273
@ -2222,6 +2222,8 @@ static inline int psa_ssl_status_to_mbedtls( psa_status_t status )
|
|||||||
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||||
case PSA_ERROR_BAD_STATE:
|
case PSA_ERROR_BAD_STATE:
|
||||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||||
|
case PSA_ERROR_BUFFER_TOO_SMALL:
|
||||||
|
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
|
||||||
default:
|
default:
|
||||||
return( MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
|
return( MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED );
|
||||||
}
|
}
|
||||||
|
@ -262,12 +262,6 @@ static int ssl_tls13_generate_and_write_ecdh_key_exchange(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( own_pubkey_len > (size_t)( end - buf ) )
|
|
||||||
{
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "No space in the buffer for ECDH public key." ) );
|
|
||||||
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
|
|
||||||
}
|
|
||||||
|
|
||||||
*out_len = own_pubkey_len;
|
*out_len = own_pubkey_len;
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
Loading…
Reference in New Issue
Block a user