Check more parameters of psa_pake_output/psa_pake_input
@@ -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 )
{
