From da77971ec87457736ffc42ae0c22e9e91ebbdd8e Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 21 Aug 2019 13:22:59 +0100 Subject: [PATCH] Fixup: Rename mbedtls_uecc_pk -> mbedtls_pk_uecc This is in line with the naming of the analogous function mbedtls_pk_ec used for legacy ECC PK contexts. --- include/mbedtls/pk.h | 2 +- library/pkparse.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h index c65f39c80..a9d763a53 100644 --- a/include/mbedtls/pk.h +++ b/include/mbedtls/pk.h @@ -173,7 +173,7 @@ static inline mbedtls_rsa_context *mbedtls_pk_rsa( const mbedtls_pk_context pk ) #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_USE_TINYCRYPT) -static inline mbedtls_uecc_keypair *mbedtls_uecc_pk( const mbedtls_pk_context pk ) +static inline mbedtls_uecc_keypair *mbedtls_pk_uecc( const mbedtls_pk_context pk ) { return( (mbedtls_uecc_keypair *) (pk).pk_ctx ); } diff --git a/library/pkparse.c b/library/pkparse.c index 79b06c7e9..a3184bfbd 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -1211,7 +1211,7 @@ static int pk_parse_key_pkcs8_unencrypted_der( if( pk_alg == MBEDTLS_PK_ECKEY ) { if( ( ret = pk_use_ecparams( ¶ms ) ) != 0 || - ( ret = pk_parse_key_sec1_der( mbedtls_uecc_pk( *pk ), p, len ) ) != 0) + ( ret = pk_parse_key_sec1_der( mbedtls_pk_uecc( *pk ), p, len ) ) != 0) { return( ret ); } @@ -1433,7 +1433,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk, #if defined(MBEDTLS_USE_TINYCRYPT) if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 || - ( ret = pk_parse_key_sec1_der( mbedtls_uecc_pk( *pk ), + ( ret = pk_parse_key_sec1_der( mbedtls_pk_uecc( *pk ), pem.buf, pem.buflen ) ) != 0 ) #else /* MBEDTLS_USE_TINYCRYPT */ if( ( ret = mbedtls_pk_setup( pk, pk_info ) ) != 0 || @@ -1563,7 +1563,7 @@ int mbedtls_pk_parse_key( mbedtls_pk_context *pk, #if defined(MBEDTLS_USE_TINYCRYPT) pk_info = mbedtls_pk_info_from_type( MBEDTLS_PK_ECKEY ); if( mbedtls_pk_setup( pk, pk_info ) == 0 && - pk_parse_key_sec1_der( mbedtls_uecc_pk( *pk), + pk_parse_key_sec1_der( mbedtls_pk_uecc( *pk), key, keylen) == 0) { return( 0 );