From da7711594ece3bff0a8eceb7a8dc9360855544a0 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 16 Sep 2013 22:45:03 +0200 Subject: [PATCH] Changed pk_parse_get_pubkey() to pk_parse_subpubkey() --- include/polarssl/pk.h | 4 ++-- library/pkparse.c | 6 +++--- library/x509_crt.c | 2 +- library/x509_csr.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/polarssl/pk.h b/include/polarssl/pk.h index 7d141d99f..c14c1496e 100644 --- a/include/polarssl/pk.h +++ b/include/polarssl/pk.h @@ -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 */ -int pk_parse_get_pubkey( unsigned char **p, const unsigned char *end, - pk_context *pk ); +int pk_parse_subpubkey( unsigned char **p, const unsigned char *end, + pk_context *pk ); #endif /* POLARSSL_PK_PARSE_C */ #if defined(POLARSSL_PK_WRITE_C) diff --git a/library/pkparse.c b/library/pkparse.c index 5a58abe1a..f123b6c2c 100644 --- a/library/pkparse.c +++ b/library/pkparse.c @@ -302,8 +302,8 @@ static int pk_get_pk_alg( unsigned char **p, * algorithm AlgorithmIdentifier, * subjectPublicKey BIT STRING } */ -int pk_parse_get_pubkey( unsigned char **p, const unsigned char *end, - pk_context *pk ) +int pk_parse_subpubkey( unsigned char **p, const unsigned char *end, + pk_context *pk ) { int ret; size_t len; @@ -945,7 +945,7 @@ int pk_parse_public_key( pk_context *ctx, #endif 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) pem_free( &pem ); diff --git a/library/x509_crt.c b/library/x509_crt.c index 3c88b5ed8..8a3f13f22 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -663,7 +663,7 @@ static int x509parse_crt_der_core( x509_cert *crt, const unsigned char *buf, /* * 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 ); return( ret ); diff --git a/library/x509_csr.c b/library/x509_csr.c index e4b05174c..aeddeb5bf 100644 --- a/library/x509_csr.c +++ b/library/x509_csr.c @@ -229,7 +229,7 @@ int x509parse_csr( x509_csr *csr, const unsigned char *buf, size_t buflen ) /* * 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 ); return( ret );