Check more parameters of psa_pake_output/psa_pake_input

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
Neil Armstrong 2022-06-08 17:42:52 +02:00
parent 645cccd6a8
commit 0d001ef3da

View file

@ -328,6 +328,9 @@ psa_status_t psa_pake_output( psa_pake_operation_t *operation,
step != PSA_PAKE_STEP_ZK_PROOF )
return( PSA_ERROR_INVALID_ARGUMENT );
if( output == NULL || output_size == 0 || output_length == NULL )
return( PSA_ERROR_INVALID_ARGUMENT );
#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE)
if( operation->alg == PSA_ALG_JPAKE )
{
@ -508,6 +511,9 @@ psa_status_t psa_pake_input( psa_pake_operation_t *operation,
step != PSA_PAKE_STEP_ZK_PROOF )
return( PSA_ERROR_INVALID_ARGUMENT );
if( input == NULL || input_length == 0 )
return( PSA_ERROR_INVALID_ARGUMENT );
#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE)
if( operation->alg == PSA_ALG_JPAKE )
{