From fb317c5221315723808416675617a36e5983304c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 18 Jun 2015 16:25:56 +0200 Subject: [PATCH] Rename parameter in a x509 helper --- include/mbedtls/x509.h | 2 +- library/x509.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/mbedtls/x509.h b/include/mbedtls/x509.h index 597053c7d..2afe4fa78 100644 --- a/include/mbedtls/x509.h +++ b/include/mbedtls/x509.h @@ -293,7 +293,7 @@ int mbedtls_x509_get_ext( unsigned char **p, const unsigned char *end, int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *sig_oid, mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, const void *sig_opts ); -int mbedtls_x509_key_size_helper( char *buf, size_t size, const char *name ); +int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name ); int mbedtls_x509_string_to_names( mbedtls_asn1_named_data **head, const char *name ); int mbedtls_x509_set_extension( mbedtls_asn1_named_data **head, const char *oid, size_t oid_len, int critical, const unsigned char *val, diff --git a/library/x509.c b/library/x509.c index bd0d69a3c..2efa62f03 100644 --- a/library/x509.c +++ b/library/x509.c @@ -859,13 +859,13 @@ int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *s /* * Helper for writing "RSA key size", "EC key size", etc */ -int mbedtls_x509_key_size_helper( char *buf, size_t size, const char *name ) +int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name ) { char *p = buf; - size_t n = size; + size_t n = buf_size; int ret; - if( strlen( name ) + sizeof( " key size" ) > size ) + if( strlen( name ) + sizeof( " key size" ) > buf_size ) return( ERR_BUF_TOO_SMALL ); ret = mbedtls_snprintf( p, n, "%s key size", name );