Rename ecp_check_prvkey with a 'i' for consistency
diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h
index 707d040..c1f08c9 100644
--- a/include/polarssl/ecp.h
+++ b/include/polarssl/ecp.h
@@ -454,7 +454,7 @@
* in order to ease use with other structures such as
* ecdh_context of ecdsa_context.
*/
-int ecp_check_prvkey( const ecp_group *grp, const mpi *d );
+int ecp_check_privkey( const ecp_group *grp, const mpi *d );
/**
* \brief Generate a keypair
diff --git a/library/ecp.c b/library/ecp.c
index 29cfce5..9e7a967 100644
--- a/library/ecp.c
+++ b/library/ecp.c
@@ -1308,7 +1308,7 @@
/*
* Check that an mpi is valid as a private key (SEC1 3.2)
*/
-int ecp_check_prvkey( const ecp_group *grp, const mpi *d )
+int ecp_check_privkey( const ecp_group *grp, const mpi *d )
{
/* We want 1 <= d <= N-1 */
if ( mpi_cmp_int( d, 1 ) < 0 || mpi_cmp_mpi( d, &grp->N ) >= 0 )
diff --git a/library/x509parse.c b/library/x509parse.c
index 179ff95..c5f9049 100644
--- a/library/x509parse.c
+++ b/library/x509parse.c
@@ -2731,7 +2731,7 @@
return( POLARSSL_ERR_X509_KEY_INVALID_FORMAT + ret );
}
- if( ( ret = ecp_check_prvkey( &eck->grp, &eck->d ) ) != 0 )
+ if( ( ret = ecp_check_privkey( &eck->grp, &eck->d ) ) != 0 )
{
ecp_keypair_free( eck );
return( ret );
@@ -2823,7 +2823,7 @@
return( ret );
}
- if( ( ret = ecp_check_prvkey( &eck->grp, &eck->d ) ) != 0 )
+ if( ( ret = ecp_check_privkey( &eck->grp, &eck->d ) ) != 0 )
{
ecp_keypair_free( eck );
return( ret );
diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function
index 2baf764..b6383d7 100644
--- a/tests/suites/test_suite_x509parse.function
+++ b/tests/suites/test_suite_x509parse.function
@@ -220,7 +220,7 @@
ecp_keypair *eckey;
TEST_ASSERT( ctx.type == POLARSSL_PK_ECKEY );
eckey = (ecp_keypair *) ctx.data;
- TEST_ASSERT( ecp_check_prvkey( &eckey->grp, &eckey->d ) == 0 );
+ TEST_ASSERT( ecp_check_privkey( &eckey->grp, &eckey->d ) == 0 );
}
pk_free( &ctx );