Fix parameter name signature_size for psa_asymmetric_verify
It should have been signature_length, following our conventions.
This commit is contained in:
parent
e9191ff90b
commit
526fab0066
@ -1791,7 +1791,7 @@ psa_status_t psa_asymmetric_sign(psa_key_slot_t key,
|
|||||||
* \param salt_length Size of the \c salt buffer in bytes.
|
* \param salt_length Size of the \c salt buffer in bytes.
|
||||||
* If \c salt is \c NULL, pass 0.
|
* If \c salt is \c NULL, pass 0.
|
||||||
* \param signature Buffer containing the signature to verify.
|
* \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
|
* \retval PSA_SUCCESS
|
||||||
* The signature is valid.
|
* The signature is valid.
|
||||||
@ -1812,7 +1812,7 @@ psa_status_t psa_asymmetric_verify(psa_key_slot_t key,
|
|||||||
const uint8_t *salt,
|
const uint8_t *salt,
|
||||||
size_t salt_length,
|
size_t salt_length,
|
||||||
const uint8_t *signature,
|
const uint8_t *signature,
|
||||||
size_t signature_size);
|
size_t signature_length);
|
||||||
|
|
||||||
#define PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \
|
#define PSA_ASYMMETRIC_ENCRYPT_OUTPUT_SIZE(key_type, key_bits, alg) \
|
||||||
(PSA_KEY_TYPE_IS_RSA(key_type) ? \
|
(PSA_KEY_TYPE_IS_RSA(key_type) ? \
|
||||||
|
@ -1742,7 +1742,7 @@ psa_status_t psa_asymmetric_verify( psa_key_slot_t key,
|
|||||||
const uint8_t *salt,
|
const uint8_t *salt,
|
||||||
size_t salt_length,
|
size_t salt_length,
|
||||||
const uint8_t *signature,
|
const uint8_t *signature,
|
||||||
size_t signature_size )
|
size_t signature_length )
|
||||||
{
|
{
|
||||||
key_slot_t *slot;
|
key_slot_t *slot;
|
||||||
psa_status_t status;
|
psa_status_t status;
|
||||||
@ -1768,7 +1768,7 @@ psa_status_t psa_asymmetric_verify( psa_key_slot_t key,
|
|||||||
if( status != PSA_SUCCESS )
|
if( status != PSA_SUCCESS )
|
||||||
return( status );
|
return( status );
|
||||||
|
|
||||||
if( signature_size < rsa->len )
|
if( signature_length < rsa->len )
|
||||||
return( PSA_ERROR_BUFFER_TOO_SMALL );
|
return( PSA_ERROR_BUFFER_TOO_SMALL );
|
||||||
#if defined(MBEDTLS_PKCS1_V15)
|
#if defined(MBEDTLS_PKCS1_V15)
|
||||||
if( PSA_ALG_IS_RSA_PKCS1V15_SIGN( alg ) )
|
if( PSA_ALG_IS_RSA_PKCS1V15_SIGN( alg ) )
|
||||||
@ -1815,7 +1815,7 @@ psa_status_t psa_asymmetric_verify( psa_key_slot_t key,
|
|||||||
int ret;
|
int ret;
|
||||||
(void) alg;
|
(void) alg;
|
||||||
ret = mbedtls_ecdsa_read_signature( ecdsa, hash, hash_length,
|
ret = mbedtls_ecdsa_read_signature( ecdsa, hash, hash_length,
|
||||||
signature, signature_size );
|
signature, signature_length );
|
||||||
return( mbedtls_to_psa_error( ret ) );
|
return( mbedtls_to_psa_error( ret ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user