mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-05 16:27:23 +00:00
@@ -2452,6 +2452,17 @@ mbedtls_ssl_mode_t mbedtls_ssl_get_mode_from_ciphersuite(
|
|||||||
|
|
||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||||
|
|
||||||
|
const mbedtls_error_pair_t psa_to_ssl_errors[] =
|
||||||
|
{
|
||||||
|
{ PSA_SUCCESS, 0 },
|
||||||
|
{ PSA_ERROR_INSUFFICIENT_MEMORY, MBEDTLS_ERR_SSL_ALLOC_FAILED },
|
||||||
|
{ PSA_ERROR_NOT_SUPPORTED, MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE },
|
||||||
|
{ PSA_ERROR_INVALID_SIGNATURE, MBEDTLS_ERR_SSL_INVALID_MAC },
|
||||||
|
{ PSA_ERROR_INVALID_ARGUMENT, MBEDTLS_ERR_SSL_BAD_INPUT_DATA },
|
||||||
|
{ PSA_ERROR_BAD_STATE, MBEDTLS_ERR_SSL_INTERNAL_ERROR },
|
||||||
|
{ PSA_ERROR_BUFFER_TOO_SMALL, MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL }
|
||||||
|
};
|
||||||
|
|
||||||
psa_status_t mbedtls_ssl_cipher_to_psa(mbedtls_cipher_type_t mbedtls_cipher_type,
|
psa_status_t mbedtls_ssl_cipher_to_psa(mbedtls_cipher_type_t mbedtls_cipher_type,
|
||||||
size_t taglen,
|
size_t taglen,
|
||||||
psa_algorithm_t *alg,
|
psa_algorithm_t *alg,
|
||||||
|
|||||||
@@ -28,10 +28,6 @@
|
|||||||
#if defined(MBEDTLS_LMS_C)
|
#if defined(MBEDTLS_LMS_C)
|
||||||
#include <mbedtls/lms.h>
|
#include <mbedtls/lms.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_TLS_C) && \
|
|
||||||
(defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3))
|
|
||||||
#include <mbedtls/ssl.h>
|
|
||||||
#endif
|
|
||||||
#if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY) || \
|
#if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY) || \
|
||||||
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC)
|
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC)
|
||||||
#include <mbedtls/rsa.h>
|
#include <mbedtls/rsa.h>
|
||||||
@@ -79,20 +75,6 @@ const mbedtls_error_pair_t psa_to_lms_errors[] =
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_TLS_C) && \
|
|
||||||
(defined(MBEDTLS_USE_PSA_CRYPTO) || defined(MBEDTLS_SSL_PROTO_TLS1_3))
|
|
||||||
const mbedtls_error_pair_t psa_to_ssl_errors[] =
|
|
||||||
{
|
|
||||||
{ PSA_SUCCESS, 0 },
|
|
||||||
{ PSA_ERROR_INSUFFICIENT_MEMORY, MBEDTLS_ERR_SSL_ALLOC_FAILED },
|
|
||||||
{ PSA_ERROR_NOT_SUPPORTED, MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE },
|
|
||||||
{ PSA_ERROR_INVALID_SIGNATURE, MBEDTLS_ERR_SSL_INVALID_MAC },
|
|
||||||
{ PSA_ERROR_INVALID_ARGUMENT, MBEDTLS_ERR_SSL_BAD_INPUT_DATA },
|
|
||||||
{ PSA_ERROR_BAD_STATE, MBEDTLS_ERR_SSL_INTERNAL_ERROR },
|
|
||||||
{ PSA_ERROR_BUFFER_TOO_SMALL, MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL }
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY) || \
|
#if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY) || \
|
||||||
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC)
|
defined(PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC)
|
||||||
const mbedtls_error_pair_t psa_to_pk_rsa_errors[] =
|
const mbedtls_error_pair_t psa_to_pk_rsa_errors[] =
|
||||||
|
|||||||
Reference in New Issue
Block a user