mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Merge pull request #3872 from gabor-mezei-arm/3275_use_PSA_ERROR_DATA_INVALID_where_warranted
Use PSA_ERROR_DATA_INVALID where warranted
This commit is contained in:
@ -270,6 +270,46 @@
|
||||
*/
|
||||
#define PSA_ERROR_INVALID_HANDLE ((psa_status_t)-136)
|
||||
|
||||
/** Stored data has been corrupted.
|
||||
*
|
||||
* This error indicates that some persistent storage has suffered corruption.
|
||||
* It does not indicate the following situations, which have specific error
|
||||
* codes:
|
||||
*
|
||||
* - A corruption of volatile memory - use #PSA_ERROR_CORRUPTION_DETECTED.
|
||||
* - A communication error between the cryptoprocessor and its external
|
||||
* storage - use #PSA_ERROR_COMMUNICATION_FAILURE.
|
||||
* - When the storage is in a valid state but is full - use
|
||||
* #PSA_ERROR_INSUFFICIENT_STORAGE.
|
||||
* - When the storage fails for other reasons - use
|
||||
* #PSA_ERROR_STORAGE_FAILURE.
|
||||
* - When the stored data is not valid - use #PSA_ERROR_DATA_INVALID.
|
||||
*
|
||||
* \note A storage corruption does not indicate that any data that was
|
||||
* previously read is invalid. However this previously read data might no
|
||||
* longer be readable from storage.
|
||||
*
|
||||
* When a storage failure occurs, it is no longer possible to ensure the
|
||||
* global integrity of the keystore.
|
||||
*/
|
||||
#define PSA_ERROR_DATA_CORRUPT ((psa_status_t)-152)
|
||||
|
||||
/** Data read from storage is not valid for the implementation.
|
||||
*
|
||||
* This error indicates that some data read from storage does not have a valid
|
||||
* format. It does not indicate the following situations, which have specific
|
||||
* error codes:
|
||||
*
|
||||
* - When the storage or stored data is corrupted - use #PSA_ERROR_DATA_CORRUPT
|
||||
* - When the storage fails for other reasons - use #PSA_ERROR_STORAGE_FAILURE
|
||||
* - An invalid argument to the API - use #PSA_ERROR_INVALID_ARGUMENT
|
||||
*
|
||||
* This error is typically a result of either storage corruption on a
|
||||
* cleartext storage backend, or an attempt to read data that was
|
||||
* written by an incompatible version of the library.
|
||||
*/
|
||||
#define PSA_ERROR_DATA_INVALID ((psa_status_t)-153)
|
||||
|
||||
/**@}*/
|
||||
|
||||
/** \defgroup crypto_types Key and algorithm types
|
||||
|
Reference in New Issue
Block a user