Skip to content

Commit e02a8ab

Browse files
authored
Merge pull request #8925 from Patater/crypto-storage-config-fixes
Fix PSA storage typo
2 parents 403405c + 6de7c18 commit e02a8ab

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

components/TARGET_PSA/services/psa_prot_internal_storage/COMPONENT_PSA_SRV_IMPL/pits_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ psa_its_status_t psa_its_get_impl(uint32_t pid, uint32_t uid, uint32_t data_offs
154154

155155
if (kvstore_status == MBED_SUCCESS) {
156156
if (data_offset > kv_info.size) {
157-
return PSA_PS_ERROR_OFFSET_INVALID;
157+
return PSA_ITS_ERROR_OFFSET_INVALID;
158158
}
159159

160160
// Verify (size + offset) does not wrap around

components/TARGET_PSA/services/psa_prot_internal_storage/psa_prot_internal_storage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ typedef uint32_t psa_its_status_t;
5757
#define PSA_ITS_ERROR_BAD_POINTER 6 /**< The operation failed because one of the provided pointers is invalid, for example is `NULL` or references memory the caller cannot access */
5858
#define PSA_ITS_ERROR_KEY_NOT_FOUND 7 /**< The operation failed because the provided key value was not found in the storage */
5959
#define PSA_ITS_ERROR_INCORRECT_SIZE 8 /**< The operation failed because the data associated with provided key is not the same size as `data_size` */
60-
#define PSA_PS_ERROR_OFFSET_INVALID 9 /**< The operation failed because an offset was supplied that is invalid for the existing data associated with the uid. For example, offset + size is
60+
#define PSA_ITS_ERROR_OFFSET_INVALID 9 /**< The operation failed because an offset was supplied that is invalid for the existing data associated with the uid. For example, offset + size is
6161
past the end of the data */
6262

6363
/**
@@ -98,7 +98,7 @@ psa_its_status_t psa_its_set(uint32_t uid, uint32_t data_length, const void *p_d
9898
* \retval PSA_ITS_ERROR_STORAGE_FAILURE The operation failed because the physical storage has failed (Fatal error)
9999
* \retval PSA_ITS_ERROR_BAD_POINTER The operation failed because one of the provided pointers(`p_data`, `p_data_length`)
100100
* is invalid. For example is `NULL` or references memory the caller cannot access
101-
* \retval PSA_PS_ERROR_OFFSET_INVALID The operation failed because an offset was supplied that is invalid for the existing data associated with the
101+
* \retval PSA_ITS_ERROR_OFFSET_INVALID The operation failed because an offset was supplied that is invalid for the existing data associated with the
102102
* uid. For example, offset + size is invalid,
103103
*/
104104
psa_its_status_t psa_its_get(uint32_t uid, uint32_t data_offset, uint32_t data_length, void *p_data);

features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4259,7 +4259,7 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
42594259
return( PSA_ERROR_INSUFFICIENT_STORAGE );
42604260

42614261
case PSA_ITS_ERROR_INVALID_KEY:
4262-
case PSA_PS_ERROR_OFFSET_INVALID:
4262+
case PSA_ITS_ERROR_OFFSET_INVALID:
42634263
case PSA_ITS_ERROR_INCORRECT_SIZE:
42644264
case PSA_ITS_ERROR_BAD_POINTER:
42654265
return( PSA_ERROR_INVALID_ARGUMENT );

features/mbedtls/mbed-crypto/platform/TARGET_PSA/COMPONENT_PSA_SRV_IMPL/psa_crypto_storage_its.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static psa_status_t its_to_psa_error( psa_its_status_t ret )
5252
return( PSA_ERROR_INSUFFICIENT_STORAGE );
5353

5454
case PSA_ITS_ERROR_INVALID_KEY:
55-
case PSA_PS_ERROR_OFFSET_INVALID:
55+
case PSA_ITS_ERROR_OFFSET_INVALID:
5656
case PSA_ITS_ERROR_INCORRECT_SIZE:
5757
case PSA_ITS_ERROR_BAD_POINTER:
5858
return( PSA_ERROR_INVALID_ARGUMENT );

0 commit comments

Comments
 (0)