Skip to content

Commit 8e1addc

Browse files
Document BAD_STATE errors for multipart operation setup functions
Future commits will implement this and add tests.
1 parent 76d7bfe commit 8e1addc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

include/psa/crypto.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,9 @@ static psa_hash_operation_t psa_hash_operation_init(void);
784784
* Success.
785785
* \retval #PSA_ERROR_NOT_SUPPORTED
786786
* \p alg is not supported or is not a hash algorithm.
787+
* \retval #PSA_ERROR_BAD_STATE
788+
* The operation state is not valid (already set up and not
789+
* subsequently completed).
787790
* \retval #PSA_ERROR_INSUFFICIENT_MEMORY
788791
* \retval #PSA_ERROR_COMMUNICATION_FAILURE
789792
* \retval #PSA_ERROR_HARDWARE_FAILURE
@@ -1023,6 +1026,9 @@ static psa_mac_operation_t psa_mac_operation_init(void);
10231026
* \retval #PSA_ERROR_HARDWARE_FAILURE
10241027
* \retval #PSA_ERROR_TAMPERING_DETECTED
10251028
* \retval #PSA_ERROR_BAD_STATE
1029+
* The operation state is not valid (already set up and not
1030+
* subsequently completed).
1031+
* \retval #PSA_ERROR_BAD_STATE
10261032
* The library has not been previously initialized by psa_crypto_init().
10271033
* It is implementation-dependent whether a failure to initialize
10281034
* results in this error code.
@@ -1080,6 +1086,9 @@ psa_status_t psa_mac_sign_setup(psa_mac_operation_t *operation,
10801086
* \retval #PSA_ERROR_HARDWARE_FAILURE
10811087
* \retval #PSA_ERROR_TAMPERING_DETECTED
10821088
* \retval #PSA_ERROR_BAD_STATE
1089+
* The operation state is not valid (already set up and not
1090+
* subsequently completed).
1091+
* \retval #PSA_ERROR_BAD_STATE
10831092
* The library has not been previously initialized by psa_crypto_init().
10841093
* It is implementation-dependent whether a failure to initialize
10851094
* results in this error code.
@@ -1325,6 +1334,9 @@ static psa_cipher_operation_t psa_cipher_operation_init(void);
13251334
* \retval #PSA_ERROR_HARDWARE_FAILURE
13261335
* \retval #PSA_ERROR_TAMPERING_DETECTED
13271336
* \retval #PSA_ERROR_BAD_STATE
1337+
* The operation state is not valid (already set up and not
1338+
* subsequently completed).
1339+
* \retval #PSA_ERROR_BAD_STATE
13281340
* The library has not been previously initialized by psa_crypto_init().
13291341
* It is implementation-dependent whether a failure to initialize
13301342
* results in this error code.
@@ -1384,6 +1396,9 @@ psa_status_t psa_cipher_encrypt_setup(psa_cipher_operation_t *operation,
13841396
* \retval #PSA_ERROR_HARDWARE_FAILURE
13851397
* \retval #PSA_ERROR_TAMPERING_DETECTED
13861398
* \retval #PSA_ERROR_BAD_STATE
1399+
* The operation state is not valid (already set up and not
1400+
* subsequently completed).
1401+
* \retval #PSA_ERROR_BAD_STATE
13871402
* The library has not been previously initialized by psa_crypto_init().
13881403
* It is implementation-dependent whether a failure to initialize
13891404
* results in this error code.

0 commit comments

Comments
 (0)