Add new error code PLATFORM_ALLOC_FAILED for mbedtls_platform_memmove()
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
This commit is contained in:
parent
5d5841f450
commit
ce0aab4474
9 changed files with 23 additions and 19 deletions
|
@ -86,7 +86,7 @@
|
|||
* CHACHA20 3 0x0051-0x0055
|
||||
* POLY1305 3 0x0057-0x005B
|
||||
* CHACHAPOLY 2 0x0054-0x0056
|
||||
* PLATFORM 3 0x0070-0x0072 0x0071-0x0071
|
||||
* PLATFORM 4 0x0070-0x0072 0x0071-0x0071 0x0076-0x0076
|
||||
*
|
||||
* High-level module nr (3 bits - 0x0...-0x7...)
|
||||
* Name ID Nr of Errors
|
||||
|
|
|
@ -133,6 +133,7 @@ void mbedtls_nist_kw_free( mbedtls_nist_kw_context *ctx );
|
|||
*
|
||||
* \return \c 0 on success.
|
||||
* \return \c MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA for invalid input length.
|
||||
* \return \c MBEDTLS_ERR_PLATFORM_ALLOC_FAILED in case of a memory allocation failure.
|
||||
* \return cipher-specific error code on failure of the underlying cipher.
|
||||
*/
|
||||
int mbedtls_nist_kw_wrap( mbedtls_nist_kw_context *ctx, mbedtls_nist_kw_mode_t mode,
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#define MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED -0x0070 /**< Hardware accelerator failed */
|
||||
#define MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED -0x0072 /**< The requested feature is not supported by the platform */
|
||||
#define MBEDTLS_ERR_PLATFORM_FAULT_DETECTED -0x0071 /**< A hardware fault was detected in a critical path. As a security precaution this should be treated as a potential physical attack */
|
||||
#define MBEDTLS_ERR_PLATFORM_ALLOC_FAILED -0x0076 /**< Memory allocation failed */
|
||||
|
||||
#if defined(MBEDTLS_PLATFORM_C)
|
||||
|
||||
|
|
|
@ -209,8 +209,8 @@ void *mbedtls_platform_memcpy( void *dst, const void *src, size_t num );
|
|||
* \param src Source buffer where the data is being moved from.
|
||||
* \param num The length of the buffers in bytes.
|
||||
*
|
||||
* \return 0 if the operation was successful or -1 if memory allocation
|
||||
* failed.
|
||||
* \return 0 if the operation was successful
|
||||
* \return #MBEDTLS_ERR_PLATFORM_ALLOC_FAILED if a memory allocation failed
|
||||
*/
|
||||
int mbedtls_platform_memmove( void *dst, const void *src, size_t num );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue