mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Respect MBEDTLS_HAVE_TIME in ssl_ticket
Make use of ticket generation time and associated fields conditional on MBEDTLS_HAVE_TIME, to avoid compile errors on baremetal. Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@ -33,7 +33,10 @@
|
|||||||
|
|
||||||
#include "mbedtls/ssl.h"
|
#include "mbedtls/ssl.h"
|
||||||
#include "mbedtls/cipher.h"
|
#include "mbedtls/cipher.h"
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
#include "mbedtls/platform_time.h"
|
#include "mbedtls/platform_time.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
#include "psa/crypto.h"
|
#include "psa/crypto.h"
|
||||||
@ -57,7 +60,9 @@ typedef struct mbedtls_ssl_ticket_key
|
|||||||
{
|
{
|
||||||
unsigned char MBEDTLS_PRIVATE(name)[MBEDTLS_SSL_TICKET_KEY_NAME_BYTES];
|
unsigned char MBEDTLS_PRIVATE(name)[MBEDTLS_SSL_TICKET_KEY_NAME_BYTES];
|
||||||
/*!< random key identifier */
|
/*!< random key identifier */
|
||||||
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
mbedtls_time_t MBEDTLS_PRIVATE(generation_time); /*!< key generation timestamp (seconds) */
|
mbedtls_time_t MBEDTLS_PRIVATE(generation_time); /*!< key generation timestamp (seconds) */
|
||||||
|
#endif
|
||||||
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
#if !defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||||
mbedtls_cipher_context_t MBEDTLS_PRIVATE(ctx); /*!< context for auth enc/decryption */
|
mbedtls_cipher_context_t MBEDTLS_PRIVATE(ctx); /*!< context for auth enc/decryption */
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user