Remove unnecessary checks in psa_jpake_prologue()

These checks are not needed as long as the state is intact.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2023-06-20 18:21:44 +01:00
parent e5b374adaf
commit 88d25f0075

View file

@ -8047,19 +8047,6 @@ static psa_status_t psa_jpake_prologue(
return PSA_ERROR_BAD_STATE;
}
/* Check that we do not already have enough inputs/outputs for
* this round */
if (io_mode == PSA_JPAKE_INPUT) {
if (computation_stage->inputs >=
PSA_JPAKE_EXPECTED_INPUTS(computation_stage->round)) {
return PSA_ERROR_BAD_STATE;
}
} else {
if (computation_stage->outputs >=
PSA_JPAKE_EXPECTED_OUTPUTS(computation_stage->round)) {
return PSA_ERROR_BAD_STATE;
}
}
return PSA_SUCCESS;
}