Commit da771159 authored by Paul Bakker's avatar Paul Bakker
Browse files

Changed pk_parse_get_pubkey() to pk_parse_subpubkey()

parent ff3a518e
...@@ -517,8 +517,8 @@ int pk_write_key_pem( pk_context *key, unsigned char *buf, size_t size ); ...@@ -517,8 +517,8 @@ int pk_write_key_pem( pk_context *key, unsigned char *buf, size_t size );
* *
* \return 0 if successful, or a specific PK error code * \return 0 if successful, or a specific PK error code
*/ */
int pk_parse_get_pubkey( unsigned char **p, const unsigned char *end, int pk_parse_subpubkey( unsigned char **p, const unsigned char *end,
pk_context *pk ); pk_context *pk );
#endif /* POLARSSL_PK_PARSE_C */ #endif /* POLARSSL_PK_PARSE_C */
#if defined(POLARSSL_PK_WRITE_C) #if defined(POLARSSL_PK_WRITE_C)
......
...@@ -302,8 +302,8 @@ static int pk_get_pk_alg( unsigned char **p, ...@@ -302,8 +302,8 @@ static int pk_get_pk_alg( unsigned char **p,
* algorithm AlgorithmIdentifier, * algorithm AlgorithmIdentifier,
* subjectPublicKey BIT STRING } * subjectPublicKey BIT STRING }
*/ */
int pk_parse_get_pubkey( unsigned char **p, const unsigned char *end, int pk_parse_subpubkey( unsigned char **p, const unsigned char *end,
pk_context *pk ) pk_context *pk )
{ {
int ret; int ret;
size_t len; size_t len;
...@@ -945,7 +945,7 @@ int pk_parse_public_key( pk_context *ctx, ...@@ -945,7 +945,7 @@ int pk_parse_public_key( pk_context *ctx,
#endif #endif
p = (unsigned char *) key; p = (unsigned char *) key;
ret = pk_parse_get_pubkey( &p, p + keylen, ctx ); ret = pk_parse_subpubkey( &p, p + keylen, ctx );
#if defined(POLARSSL_PEM_PARSE_C) #if defined(POLARSSL_PEM_PARSE_C)
pem_free( &pem ); pem_free( &pem );
......
...@@ -663,7 +663,7 @@ static int x509parse_crt_der_core( x509_cert *crt, const unsigned char *buf, ...@@ -663,7 +663,7 @@ static int x509parse_crt_der_core( x509_cert *crt, const unsigned char *buf,
/* /*
* SubjectPublicKeyInfo * SubjectPublicKeyInfo
*/ */
if( ( ret = pk_parse_get_pubkey( &p, end, &crt->pk ) ) != 0 ) if( ( ret = pk_parse_subpubkey( &p, end, &crt->pk ) ) != 0 )
{ {
x509_crt_free( crt ); x509_crt_free( crt );
return( ret ); return( ret );
......
...@@ -229,7 +229,7 @@ int x509parse_csr( x509_csr *csr, const unsigned char *buf, size_t buflen ) ...@@ -229,7 +229,7 @@ int x509parse_csr( x509_csr *csr, const unsigned char *buf, size_t buflen )
/* /*
* subjectPKInfo SubjectPublicKeyInfo * subjectPKInfo SubjectPublicKeyInfo
*/ */
if( ( ret = pk_parse_get_pubkey( &p, end, &csr->pk ) ) != 0 ) if( ( ret = pk_parse_subpubkey( &p, end, &csr->pk ) ) != 0 )
{ {
x509_csr_free( csr ); x509_csr_free( csr );
return( ret ); return( ret );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment