mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Improve a comment.
ECDSA keys work with mbedtls_pk_ec() too, but we don't want to accept them here, so the comment should reflect that the check is not just about ensuring pk_ec() works. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
committed by
Manuel Pégourié-Gonnard
parent
a4a4aab542
commit
b9c7ea459e
@ -3241,7 +3241,8 @@ static int ssl_get_ecdh_params_from_cert( mbedtls_ssl_context *ssl )
|
||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||
mbedtls_pk_context *own_key = mbedtls_ssl_own_key( ssl );
|
||||
|
||||
/* We want to call mbedtls_pk_ec(), which only works on those types. */
|
||||
/* Check if the key is a transparent ECDH key.
|
||||
* This also ensures that it is safe to call mbedtls_pk_ec(). */
|
||||
if( mbedtls_pk_get_type( own_key ) != MBEDTLS_PK_ECKEY &&
|
||||
mbedtls_pk_get_type( own_key ) != MBEDTLS_PK_ECKEY_DH )
|
||||
{
|
||||
|
Reference in New Issue
Block a user