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.
diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h
index c65f39c..a9d763a 100644
--- a/include/mbedtls/pk.h
+++ b/include/mbedtls/pk.h
@@ -173,7 +173,7 @@
#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 79b06c7..a3184bf 100644
--- a/library/pkparse.c
+++ b/library/pkparse.c
@@ -1211,7 +1211,7 @@
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 @@
#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 @@
#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 );