From 531a4297e49740727255d3716e85d17309663c7d Mon Sep 17 00:00:00 2001 From: Andrew Thoelke Date: Tue, 18 Jun 2024 11:02:21 +0100 Subject: [PATCH] Fix: missing BAD_STATE errors in iop setup functions --- doc/crypto/api/ops/signature.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/crypto/api/ops/signature.rst b/doc/crypto/api/ops/signature.rst index 75167616..62d0f98c 100644 --- a/doc/crypto/api/ops/signature.rst +++ b/doc/crypto/api/ops/signature.rst @@ -761,6 +761,11 @@ An interruptible asymmetric signature operation is used as follows: * ``alg`` is not an asymmetric signature algorithm. * ``key`` is not an asymmetric key pair, that is compatible with ``alg``. + .. retval:: PSA_ERROR_BAD_STATE + The following conditions can result in this error: + + * The operation state is not valid: it must be inactive. + * The library requires initializing by a call to `psa_crypto_init()`. .. retval:: PSA_ERROR_INSUFFICIENT_MEMORY .. retval:: PSA_ERROR_COMMUNICATION_FAILURE .. retval:: PSA_ERROR_CORRUPTION_DETECTED @@ -1113,6 +1118,11 @@ An interruptible asymmetric verification operation is used as follows: * ``alg`` is not an asymmetric signature algorithm. * ``key`` is not an asymmetric key pair, or asymmetric public key, that is compatible with ``alg``. * ``signature`` is not a valid signature for the algorithm and key. + .. retval:: PSA_ERROR_BAD_STATE + The following conditions can result in this error: + + * The operation state is not valid: it must be inactive. + * The library requires initializing by a call to `psa_crypto_init()`. .. retval:: PSA_ERROR_INVALID_SIGNATURE ``signature`` is not a valid signature for the algorithm and key. .. retval:: PSA_ERROR_INSUFFICIENT_MEMORY