mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Rm dead !USE_PSA code: SSL hooks
unifdef -m -DMBEDTLS_USE_PSA_CRYPTO {library,include/mbedtls}/ssl_{ticket,cookie}.[ch] Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@@ -15,11 +15,6 @@
|
||||
|
||||
#include "mbedtls/ssl.h"
|
||||
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "mbedtls/threading.h"
|
||||
#endif
|
||||
#endif /* !MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
/**
|
||||
* \name SECTION: Module settings
|
||||
@@ -42,23 +37,14 @@ extern "C" {
|
||||
* \brief Context for the default cookie functions.
|
||||
*/
|
||||
typedef struct mbedtls_ssl_cookie_ctx {
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
mbedtls_svc_key_id_t MBEDTLS_PRIVATE(psa_hmac_key); /*!< key id for the HMAC portion */
|
||||
psa_algorithm_t MBEDTLS_PRIVATE(psa_hmac_alg); /*!< key algorithm for the HMAC portion */
|
||||
#else
|
||||
mbedtls_md_context_t MBEDTLS_PRIVATE(hmac_ctx); /*!< context for the HMAC portion */
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
#if !defined(MBEDTLS_HAVE_TIME)
|
||||
unsigned long MBEDTLS_PRIVATE(serial); /*!< serial number for expiration */
|
||||
#endif
|
||||
unsigned long MBEDTLS_PRIVATE(timeout); /*!< timeout delay, in seconds if HAVE_TIME,
|
||||
or in number of tickets issued */
|
||||
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
mbedtls_threading_mutex_t MBEDTLS_PRIVATE(mutex);
|
||||
#endif
|
||||
#endif /* !MBEDTLS_USE_PSA_CRYPTO */
|
||||
} mbedtls_ssl_cookie_ctx;
|
||||
|
||||
/**
|
||||
|
@@ -26,9 +26,7 @@
|
||||
#include "mbedtls/platform_time.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
#include "psa/crypto.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "mbedtls/threading.h"
|
||||
@@ -54,14 +52,10 @@ typedef struct mbedtls_ssl_ticket_key {
|
||||
* tickets created under that key.
|
||||
*/
|
||||
uint32_t MBEDTLS_PRIVATE(lifetime);
|
||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
mbedtls_cipher_context_t MBEDTLS_PRIVATE(ctx); /*!< context for auth enc/decryption */
|
||||
#else
|
||||
mbedtls_svc_key_id_t MBEDTLS_PRIVATE(key); /*!< key used for auth enc/decryption */
|
||||
psa_algorithm_t MBEDTLS_PRIVATE(alg); /*!< algorithm of auth enc/decryption */
|
||||
psa_key_type_t MBEDTLS_PRIVATE(key_type); /*!< key type */
|
||||
size_t MBEDTLS_PRIVATE(key_bits); /*!< key length in bits */
|
||||
#endif
|
||||
}
|
||||
mbedtls_ssl_ticket_key;
|
||||
|
||||
|
Reference in New Issue
Block a user