From 5805fbedcb95b0668af4a0505be67727f77da2bc Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Wed, 5 Oct 2016 15:33:53 +0100 Subject: [PATCH] Fix CMAC interface for doxygen Parameters didn't match the function definition. --- include/mbedtls/cmac.h | 2 +- library/cmac.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/mbedtls/cmac.h b/include/mbedtls/cmac.h index 6d531dddb..71f7ab43a 100644 --- a/include/mbedtls/cmac.h +++ b/include/mbedtls/cmac.h @@ -69,7 +69,7 @@ struct mbedtls_cmac_context_t * \return 0 if successful, or a cipher specific error code */ int mbedtls_cipher_cmac_starts( mbedtls_cipher_context_t *ctx, - const unsigned char *key, size_t keylen ); + const unsigned char *key, size_t keybits ); /** * \brief Generic CMAC process buffer. diff --git a/library/cmac.c b/library/cmac.c index 1eb1c1074..5a6206ea9 100644 --- a/library/cmac.c +++ b/library/cmac.c @@ -201,7 +201,7 @@ static void cmac_pad( unsigned char padded_block[16], } int mbedtls_cipher_cmac_starts( mbedtls_cipher_context_t *ctx, - const unsigned char *key, size_t keylen ) + const unsigned char *key, size_t keybits ) { mbedtls_cipher_type_t type; mbedtls_cmac_context_t *cmac_ctx; @@ -211,7 +211,7 @@ int mbedtls_cipher_cmac_starts( mbedtls_cipher_context_t *ctx, if( ctx == NULL || ctx->cipher_info == NULL || key == NULL ) return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - if( ( retval = mbedtls_cipher_setkey( ctx, key, keylen, + if( ( retval = mbedtls_cipher_setkey( ctx, key, keybits, MBEDTLS_ENCRYPT ) ) != 0 ) return( retval );