Fix parameter name signature_size for psa_asymmetric_verify
It should have been signature_length, following our conventions.
diff --git a/include/psa/crypto.h b/include/psa/crypto.h
index 4f1fd7d..62334dd 100644
--- a/include/psa/crypto.h
+++ b/include/psa/crypto.h
@@ -1791,7 +1791,7 @@
* \param salt_length Size of the \c salt buffer in bytes.
* If \c salt is \c NULL, pass 0.
* \param signature Buffer containing the signature to verify.
- * \param signature_size Size of the \c signature buffer in bytes.
+ * \param signature_length Size of the \c signature buffer in bytes.
*
* \retval PSA_SUCCESS
* The signature is valid.
@@ -1812,7 +1812,7 @@
const uint8_t *salt,
size_t salt_length,
const uint8_t *signature,
- size_t signature_size);
+ size_t signature_length);
#define PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \
(PSA_KEY_TYPE_IS_RSA(key_type) ? \
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index c7a44f6..35adbb4 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1742,7 +1742,7 @@
const uint8_t *salt,
size_t salt_length,
const uint8_t *signature,
- size_t signature_size )
+ size_t signature_length )
{
key_slot_t *slot;
psa_status_t status;
@@ -1768,7 +1768,7 @@
if( status != PSA_SUCCESS )
return( status );
- if( signature_size < rsa->len )
+ if( signature_length < rsa->len )
return( PSA_ERROR_BUFFER_TOO_SMALL );
#if defined(MBEDTLS_PKCS1_V15)
if( PSA_ALG_IS_RSA_PKCS1V15_SIGN( alg ) )
@@ -1815,7 +1815,7 @@
int ret;
(void) alg;
ret = mbedtls_ecdsa_read_signature( ecdsa, hash, hash_length,
- signature, signature_size );
+ signature, signature_length );
return( mbedtls_to_psa_error( ret ) );
}
else