From e9b4581b163869e291b24d845d5f139945882ce0 Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Fri, 20 May 2022 11:39:09 +0200 Subject: [PATCH] Clarify BAD_STATE return documentation on bad ordering of input and output steps for psa_pake_input() & psa_pake_output() Signed-off-by: Neil Armstrong --- include/psa/crypto_extra.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/psa/crypto_extra.h b/include/psa/crypto_extra.h index 26d9d9c061..3d974c7e11 100644 --- a/include/psa/crypto_extra.h +++ b/include/psa/crypto_extra.h @@ -1627,8 +1627,9 @@ psa_status_t psa_pake_set_role(psa_pake_operation_t *operation, * \retval #PSA_ERROR_DATA_CORRUPT * \retval #PSA_ERROR_DATA_INVALID * \retval #PSA_ERROR_BAD_STATE - * The operation state is not valid (it must be active, but beyond that - * validity is specific to the algorithm), or + * The operation state is not valid (it must be active, and fully set + * up, and this call must conform to the algorithm's requirements + * for ordering of input and output steps), or * the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code. @@ -1681,8 +1682,9 @@ psa_status_t psa_pake_output(psa_pake_operation_t *operation, * \retval #PSA_ERROR_DATA_CORRUPT * \retval #PSA_ERROR_DATA_INVALID * \retval #PSA_ERROR_BAD_STATE - * The operation state is not valid (it must be active, but beyond that - * validity is specific to the algorithm), or + * The operation state is not valid (it must be active, and fully set + * up, and this call must conform to the algorithm's requirements + * for ordering of input and output steps), or * the library has not been previously initialized by psa_crypto_init(). * It is implementation-dependent whether a failure to initialize * results in this error code.