Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:51

0001 /**
0002  * \file compat-3-crypto.h
0003  *
0004  * \brief Compatibility definitions for MbedTLS 3.x code built with
0005  *        MbedTLS 4.x or TF-PSA-Crypto 1.x
0006  *
0007  */
0008 /*
0009  *  Copyright The Mbed TLS Contributors
0010  *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
0011  */
0012 
0013 #ifndef MBEDTLS_COMPAT_3_CRYPTO_H
0014 #define MBEDTLS_COMPAT_3_CRYPTO_H
0015 
0016 #include "psa/crypto_values.h"
0017 
0018 /** Output buffer too small. */
0019 #define MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL               PSA_ERROR_BUFFER_TOO_SMALL
0020 /** Buffer too small when writing ASN.1 data structure. */
0021 #define MBEDTLS_ERR_ASN1_BUF_TOO_SMALL                    PSA_ERROR_BUFFER_TOO_SMALL
0022 /** Input/output buffer is too small to contain requited data */
0023 #define MBEDTLS_ERR_LMS_BUFFER_TOO_SMALL                  PSA_ERROR_BUFFER_TOO_SMALL
0024 /** The output buffer is too small. */
0025 #define MBEDTLS_ERR_PK_BUFFER_TOO_SMALL                   PSA_ERROR_BUFFER_TOO_SMALL
0026 
0027 /** Memory allocation failed. */
0028 #define MBEDTLS_ERR_PK_ALLOC_FAILED                       PSA_ERROR_INSUFFICIENT_MEMORY
0029 /** Failed to allocate memory. */
0030 #define MBEDTLS_ERR_PEM_ALLOC_FAILED                      PSA_ERROR_INSUFFICIENT_MEMORY
0031 /** Memory allocation failed */
0032 #define MBEDTLS_ERR_ASN1_ALLOC_FAILED                     PSA_ERROR_INSUFFICIENT_MEMORY
0033 /** LMS failed to allocate space for a private key */
0034 #define MBEDTLS_ERR_LMS_ALLOC_FAILED                      PSA_ERROR_INSUFFICIENT_MEMORY
0035 
0036 /** Bad input parameters to function. */
0037 #define MBEDTLS_ERR_PK_BAD_INPUT_DATA                     PSA_ERROR_INVALID_ARGUMENT
0038 /** Bad input parameters to function. */
0039 #define MBEDTLS_ERR_PEM_BAD_INPUT_DATA                    PSA_ERROR_INVALID_ARGUMENT
0040 /** Bad data has been input to an LMS function */
0041 #define MBEDTLS_ERR_LMS_BAD_INPUT_DATA                    PSA_ERROR_INVALID_ARGUMENT
0042 
0043 #endif /* MBEDTLS_COMPAT_3_CRYPTO_H */