mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-08-04 06:51:03 +00:00
Merge remote-tracking branch 'restricted/pr/601' into baremetal-proposed
* restricted/pr/601: (27 commits) Fix compile-time guard for optional field in struct Move code to reduce probability of conflicts Fix typos caught by check-names.sh Clarify conditions related to resumption in client Introduce getter function for renego_status Add getter function for handshake->resume Remove now-redundant code Remove cache callbacks from config on client Fix a few style issues Expand documentation of new options a bit Fix renaming oversight in documentation Remove backticks in doxygen in config.h Declare dependency on tickets for two ssl-opt.sh tests Exclude new negative options from config.pl full Restore config.h defaults Address review comments Fix ssl_cli resumption guards Fix check-files, check-names and check-generated-features Add test to all.sh Add changelog entry ...
This commit is contained in:
commit
37261e6f6b
42
ChangeLog
42
ChangeLog
|
@ -38,24 +38,12 @@ Features
|
||||||
ServerHello.
|
ServerHello.
|
||||||
* Add new configuration option MBEDTLS_SSL_PROTO_NO_TLS that enables code
|
* Add new configuration option MBEDTLS_SSL_PROTO_NO_TLS that enables code
|
||||||
size savings in configurations where only DTLS is used.
|
size savings in configurations where only DTLS is used.
|
||||||
|
* Add new configuration option MBEDTLS_SSL_NO_SESSION_CACHE that enables
|
||||||
API Changes
|
code size savings in configurations where cache-based session resumption is
|
||||||
* Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`.
|
not used.
|
||||||
See the Features section for more information.
|
* Add new configuration option MBEDTLS_SSL_NO_SESSION_RESUMPTION that
|
||||||
* Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert()
|
enables code size savings in configurations where no form of session
|
||||||
for the benefit of saving RAM, by disabling the new compile-time
|
resumption is used.
|
||||||
option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for
|
|
||||||
API stability). Disabling this option makes mbedtls_ssl_get_peer_cert()
|
|
||||||
always return NULL, and removes the peer_cert field from the
|
|
||||||
mbedtls_ssl_session structure which otherwise stores the peer's
|
|
||||||
certificate.
|
|
||||||
* Add a new compile-time option `MBEDTLS_X509_ON_DEMAND_PARSING`,
|
|
||||||
disabled by default, which allows to parse and cache X.509 CRTs
|
|
||||||
on demand only, at the benefit of lower RAM usage. Enabling
|
|
||||||
this option breaks the structure API of X.509 in that most
|
|
||||||
fields of `mbedtls_x509_crt` are removed, but it keeps the
|
|
||||||
X.509 function API. See the API changes section as well as
|
|
||||||
the documentation in `config.h` for more information.
|
|
||||||
|
|
||||||
Bugfix
|
Bugfix
|
||||||
* Server's RSA certificate in certs.c was SHA-1 signed. In the default
|
* Server's RSA certificate in certs.c was SHA-1 signed. In the default
|
||||||
|
@ -105,6 +93,24 @@ Changes
|
||||||
improve clarity. Fixes #2258.
|
improve clarity. Fixes #2258.
|
||||||
* Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821.
|
* Replace multiple uses of MD2 by SHA-256 in X.509 test suite. Fixes #821.
|
||||||
|
|
||||||
|
API Changes
|
||||||
|
* Add a new X.509 API call `mbedtls_x509_parse_der_nocopy()`.
|
||||||
|
See the Features section for more information.
|
||||||
|
* Allow to opt in to the removal the API mbedtls_ssl_get_peer_cert()
|
||||||
|
for the benefit of saving RAM, by disabling the new compile-time
|
||||||
|
option MBEDTLS_SSL_KEEP_PEER_CERTIFICATE (enabled by default for
|
||||||
|
API stability). Disabling this option makes mbedtls_ssl_get_peer_cert()
|
||||||
|
always return NULL, and removes the peer_cert field from the
|
||||||
|
mbedtls_ssl_session structure which otherwise stores the peer's
|
||||||
|
certificate.
|
||||||
|
* Add a new compile-time option `MBEDTLS_X509_ON_DEMAND_PARSING`,
|
||||||
|
disabled by default, which allows to parse and cache X.509 CRTs
|
||||||
|
on demand only, at the benefit of lower RAM usage. Enabling
|
||||||
|
this option breaks the structure API of X.509 in that most
|
||||||
|
fields of `mbedtls_x509_crt` are removed, but it keeps the
|
||||||
|
X.509 function API. See the API changes section as well as
|
||||||
|
the documentation in `config.h` for more information.
|
||||||
|
|
||||||
= mbed TLS 2.16.1 branch released 2019-03-19
|
= mbed TLS 2.16.1 branch released 2019-03-19
|
||||||
|
|
||||||
Features
|
Features
|
||||||
|
|
|
@ -71,6 +71,8 @@
|
||||||
#define MBEDTLS_SSL_TLS_C
|
#define MBEDTLS_SSL_TLS_C
|
||||||
#define MBEDTLS_SSL_PROTO_TLS1_2
|
#define MBEDTLS_SSL_PROTO_TLS1_2
|
||||||
#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
|
#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
|
||||||
|
#define MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
|
#define MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
#define MBEDTLS_SSL_COOKIE_C
|
#define MBEDTLS_SSL_COOKIE_C
|
||||||
#define MBEDTLS_SSL_PROTO_DTLS
|
#define MBEDTLS_SSL_PROTO_DTLS
|
||||||
#define MBEDTLS_SSL_PROTO_NO_TLS
|
#define MBEDTLS_SSL_PROTO_NO_TLS
|
||||||
|
|
|
@ -671,6 +671,16 @@
|
||||||
#error "MBEDTLS_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
|
#error "MBEDTLS_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && \
|
||||||
|
defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
|
#error "MBEDTLS_SSL_SESSION_TICKETS cannot be defined with MBEDTLS_SSL_NO_SESSION_RESUMPTION"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_CACHE) && \
|
||||||
|
defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
|
#error "MBEDTLS_SSL_NO_SESSION_CACHE needs to be defined with MBEDTLS_SSL_NO_SESSION_RESUMPTION"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_THREADING_PTHREAD)
|
#if defined(MBEDTLS_THREADING_PTHREAD)
|
||||||
#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
|
#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
|
||||||
#error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites"
|
#error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites"
|
||||||
|
|
|
@ -1278,8 +1278,8 @@
|
||||||
* which allows to identify DTLS connections across changes
|
* which allows to identify DTLS connections across changes
|
||||||
* in the underlying transport.
|
* in the underlying transport.
|
||||||
*
|
*
|
||||||
* Setting this option enables the SSL APIs `mbedtls_ssl_set_cid()`,
|
* Setting this option enables the SSL APIs mbedtls_ssl_set_cid(),
|
||||||
* `mbedtls_ssl_get_peer_cid()` and `mbedtls_ssl_conf_cid()`.
|
* mbedtls_ssl_get_peer_cid() and mbedtls_ssl_conf_cid().
|
||||||
* See the corresponding documentation for more information.
|
* See the corresponding documentation for more information.
|
||||||
*
|
*
|
||||||
* \warning The Connection ID extension is still in draft state.
|
* \warning The Connection ID extension is still in draft state.
|
||||||
|
@ -1664,10 +1664,63 @@
|
||||||
* tickets, including authenticated encryption and key management. Example
|
* tickets, including authenticated encryption and key management. Example
|
||||||
* callbacks are provided by MBEDTLS_SSL_TICKET_C.
|
* callbacks are provided by MBEDTLS_SSL_TICKET_C.
|
||||||
*
|
*
|
||||||
* Comment this macro to disable support for SSL session tickets
|
* Requires: !MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
*
|
||||||
|
* Comment this macro to disable support for SSL session tickets.
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_SSL_SESSION_TICKETS
|
#define MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
|
*
|
||||||
|
* Disable support for cache based session resumption. This is useful to
|
||||||
|
* reduce code size in configurations where cache-based session resumption is
|
||||||
|
* not used.
|
||||||
|
*
|
||||||
|
* This option is only about the server-side support of the session caches.
|
||||||
|
* Client will only need !MBEDTLS_SSL_NO_SESSION_RESUMPTION to support
|
||||||
|
* cache based session resumption.
|
||||||
|
*
|
||||||
|
* Server-side, you also need to provide callbacks for storing and reading
|
||||||
|
* sessions from cache. Example callbacks are provided by MBEDTLS_SSL_CACHE_C.
|
||||||
|
*
|
||||||
|
* If MBEDTLS_SSL_NO_SESSION_RESUMPTION is defined, this needs to be defined
|
||||||
|
* as well.
|
||||||
|
*
|
||||||
|
* Uncomment this macro to disable support for SSL session cache.
|
||||||
|
*/
|
||||||
|
//#define MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
*
|
||||||
|
* Disable support for session resumption. This is useful to reduce code size
|
||||||
|
* in configurations where no form of session resumption is used.
|
||||||
|
*
|
||||||
|
* \note Session resumption is part of the TLS standard, disabling this
|
||||||
|
* option means that the full implementation of the standard is no longer
|
||||||
|
* used. This shouldn't cause any interoperability issues as the standard
|
||||||
|
* mandates that peers who want to resume a session need to be prepared to
|
||||||
|
* fall back to a full handshake.
|
||||||
|
*
|
||||||
|
* When this flag is enabled, following needs to be true:
|
||||||
|
* MBEDTLS_SSL_NO_SESSION_CACHE enabled
|
||||||
|
* MBEDTLS_SSL_SESSION_TICKETS disabled
|
||||||
|
*
|
||||||
|
* Client-side, this is enough to enable support for cache-based session
|
||||||
|
* resumption (as defined by the TLS standard); for ticket-based resumption
|
||||||
|
* you'll also need to enable MBEDTLS_SSL_SESSION_TICKETS.
|
||||||
|
*
|
||||||
|
* Server-side, this option is only useful in conjunction with at least
|
||||||
|
* one of !MBEDTLS_SSL_NO_SESSION_CACHE or MBEDTLS_SSL_SESSION_TICKETS.
|
||||||
|
* Each one of these additionally requires an implementation of the cache
|
||||||
|
* or tickets, examples of which are provided by MBEDTLS_SSL_CACHE_C
|
||||||
|
* and MBEDTLS_SSL_TICKET_C respectively.
|
||||||
|
*
|
||||||
|
* Uncomment this macro to disable support for SSL session resumption.
|
||||||
|
*/
|
||||||
|
//#define MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MBEDTLS_SSL_EXPORT_KEYS
|
* \def MBEDTLS_SSL_EXPORT_KEYS
|
||||||
*
|
*
|
||||||
|
|
|
@ -906,11 +906,13 @@ struct mbedtls_ssl_config
|
||||||
int (*f_rng)(void *, unsigned char *, size_t);
|
int (*f_rng)(void *, unsigned char *, size_t);
|
||||||
void *p_rng; /*!< context for the RNG function */
|
void *p_rng; /*!< context for the RNG function */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
/** Callback to retrieve a session from the cache */
|
/** Callback to retrieve a session from the cache */
|
||||||
int (*f_get_cache)(void *, mbedtls_ssl_session *);
|
int (*f_get_cache)(void *, mbedtls_ssl_session *);
|
||||||
/** Callback to store a session into the cache */
|
/** Callback to store a session into the cache */
|
||||||
int (*f_set_cache)(void *, const mbedtls_ssl_session *);
|
int (*f_set_cache)(void *, const mbedtls_ssl_session *);
|
||||||
void *p_cache; /*!< context for cache callbacks */
|
void *p_cache; /*!< context for cache callbacks */
|
||||||
|
#endif /* MBEDTLS_SSL_SRV_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
|
#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
|
||||||
/** Callback for setting cert according to SNI extension */
|
/** Callback for setting cert according to SNI extension */
|
||||||
|
@ -2129,7 +2131,7 @@ void mbedtls_ssl_set_datagram_packing( mbedtls_ssl_context *ssl,
|
||||||
void mbedtls_ssl_conf_handshake_timeout( mbedtls_ssl_config *conf, uint32_t min, uint32_t max );
|
void mbedtls_ssl_conf_handshake_timeout( mbedtls_ssl_config *conf, uint32_t min, uint32_t max );
|
||||||
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
#endif /* MBEDTLS_SSL_PROTO_DTLS */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SRV_C)
|
#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
/**
|
/**
|
||||||
* \brief Set the session cache callbacks (server-side only)
|
* \brief Set the session cache callbacks (server-side only)
|
||||||
* If not set, no session resuming is done (except if session
|
* If not set, no session resuming is done (except if session
|
||||||
|
@ -2171,9 +2173,9 @@ void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf,
|
||||||
void *p_cache,
|
void *p_cache,
|
||||||
int (*f_get_cache)(void *, mbedtls_ssl_session *),
|
int (*f_get_cache)(void *, mbedtls_ssl_session *),
|
||||||
int (*f_set_cache)(void *, const mbedtls_ssl_session *) );
|
int (*f_set_cache)(void *, const mbedtls_ssl_session *) );
|
||||||
#endif /* MBEDTLS_SSL_SRV_C */
|
#endif /* MBEDTLS_SSL_SRV_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_CLI_C)
|
#if defined(MBEDTLS_SSL_CLI_C) && !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
/**
|
/**
|
||||||
* \brief Request resumption of session (client-side only)
|
* \brief Request resumption of session (client-side only)
|
||||||
* Session data is copied from presented session structure.
|
* Session data is copied from presented session structure.
|
||||||
|
@ -2189,7 +2191,7 @@ void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf,
|
||||||
* \sa mbedtls_ssl_get_session()
|
* \sa mbedtls_ssl_get_session()
|
||||||
*/
|
*/
|
||||||
int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session );
|
int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session );
|
||||||
#endif /* MBEDTLS_SSL_CLI_C */
|
#endif /* MBEDTLS_SSL_CLI_C && !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Load serialized session data into a session structure.
|
* \brief Load serialized session data into a session structure.
|
||||||
|
|
|
@ -509,7 +509,9 @@ struct mbedtls_ssl_handshake_params
|
||||||
unsigned char premaster[MBEDTLS_PREMASTER_SIZE];
|
unsigned char premaster[MBEDTLS_PREMASTER_SIZE];
|
||||||
/*!< premaster secret */
|
/*!< premaster secret */
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
int resume; /*!< session resume indicator*/
|
int resume; /*!< session resume indicator*/
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
int max_major_ver; /*!< max. major version client*/
|
int max_major_ver; /*!< max. major version client*/
|
||||||
int max_minor_ver; /*!< max. minor version client*/
|
int max_minor_ver; /*!< max. minor version client*/
|
||||||
int cli_exts; /*!< client extension presence*/
|
int cli_exts; /*!< client extension presence*/
|
||||||
|
@ -1080,6 +1082,33 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context *ssl,
|
||||||
mbedtls_record *rec );
|
mbedtls_record *rec );
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Accessor functions for optional fields of various structures
|
||||||
|
*/
|
||||||
|
|
||||||
|
static inline int mbedtls_ssl_handshake_get_resume(
|
||||||
|
const mbedtls_ssl_handshake_params *handshake )
|
||||||
|
{
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
|
return( handshake->resume );
|
||||||
|
#else
|
||||||
|
(void) handshake;
|
||||||
|
return( 0 );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int mbedtls_ssl_get_renego_status(
|
||||||
|
const mbedtls_ssl_context *ssl )
|
||||||
|
{
|
||||||
|
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
||||||
|
return( ssl->renego_status );
|
||||||
|
#else
|
||||||
|
(void) ssl;
|
||||||
|
return( MBEDTLS_SSL_INITIAL_HANDSHAKE );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Getter functions for fields in mbedtls_ssl_config which may
|
* Getter functions for fields in mbedtls_ssl_config which may
|
||||||
* be fixed at compile time via one of MBEDTLS_SSL_SSL_CONF_XXX.
|
* be fixed at compile time via one of MBEDTLS_SSL_SSL_CONF_XXX.
|
||||||
|
|
|
@ -828,9 +828,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
||||||
return( MBEDTLS_ERR_SSL_NO_RNG );
|
return( MBEDTLS_ERR_SSL_NO_RNG );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
if( mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
||||||
if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
ssl->major_ver = ssl->conf->min_major_ver;
|
ssl->major_ver = ssl->conf->min_major_ver;
|
||||||
ssl->minor_ver = ssl->conf->min_minor_ver;
|
ssl->minor_ver = ssl->conf->min_minor_ver;
|
||||||
|
@ -882,36 +880,40 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
||||||
* .. . .. extensions length (2 bytes)
|
* .. . .. extensions length (2 bytes)
|
||||||
* .. . .. extensions
|
* .. . .. extensions
|
||||||
*/
|
*/
|
||||||
n = ssl->session_negotiate->id_len;
|
|
||||||
|
|
||||||
if( n < 16 || n > 32 ||
|
/*
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
* We'll write a session of non-zero length if resumption was requested
|
||||||
ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ||
|
* by the user, we're not renegotiating, and the session ID is of
|
||||||
#endif
|
* appropriate length. Otherwise make the length 0 (for now, see next code
|
||||||
ssl->handshake->resume == 0 )
|
* block for behaviour with tickets).
|
||||||
|
*/
|
||||||
|
if( mbedtls_ssl_handshake_get_resume( ssl->handshake ) == 0 ||
|
||||||
|
mbedtls_ssl_get_renego_status( ssl ) != MBEDTLS_SSL_INITIAL_HANDSHAKE ||
|
||||||
|
ssl->session_negotiate->id_len < 16 ||
|
||||||
|
ssl->session_negotiate->id_len > 32 )
|
||||||
{
|
{
|
||||||
n = 0;
|
n = 0;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
n = ssl->session_negotiate->id_len;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||||
/*
|
/*
|
||||||
* RFC 5077 section 3.4: "When presenting a ticket, the client MAY
|
* RFC 5077 section 3.4: "When presenting a ticket, the client MAY
|
||||||
* generate and include a Session ID in the TLS ClientHello."
|
* generate and include a Session ID in the TLS ClientHello."
|
||||||
*/
|
*/
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
if( mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE &&
|
||||||
if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
ssl->session_negotiate->ticket != NULL &&
|
||||||
#endif
|
ssl->session_negotiate->ticket_len != 0 )
|
||||||
{
|
{
|
||||||
if( ssl->session_negotiate->ticket != NULL &&
|
ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->session_negotiate->id, 32 );
|
||||||
ssl->session_negotiate->ticket_len != 0 )
|
|
||||||
{
|
|
||||||
ret = ssl->conf->f_rng( ssl->conf->p_rng, ssl->session_negotiate->id, 32 );
|
|
||||||
|
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
|
|
||||||
ssl->session_negotiate->id_len = n = 32;
|
ssl->session_negotiate->id_len = n = 32;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||||
|
|
||||||
|
@ -985,9 +987,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
||||||
/*
|
/*
|
||||||
* Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV
|
* Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV
|
||||||
*/
|
*/
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
if( mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
||||||
if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "adding EMPTY_RENEGOTIATION_INFO_SCSV" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "adding EMPTY_RENEGOTIATION_INFO_SCSV" ) );
|
||||||
*p++ = (unsigned char)( MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO >> 8 );
|
*p++ = (unsigned char)( MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO >> 8 );
|
||||||
|
@ -1797,28 +1797,30 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the session can be resumed
|
* Check if the session can be resumed
|
||||||
|
*
|
||||||
|
* We're only resuming a session if it was requested (handshake->resume
|
||||||
|
* already set to 1 by mbedtls_ssl_set_session()), and further conditions
|
||||||
|
* are satisfied (not renegotiating, ID and ciphersuite match, etc).
|
||||||
|
*
|
||||||
|
* Update handshake->resume to the value it will keep for the rest of the
|
||||||
|
* handshake, and that will be used to determine the relative order
|
||||||
|
* client/server last flights, as well as in handshake_wrapup().
|
||||||
*/
|
*/
|
||||||
if( ssl->handshake->resume == 0 || n == 0 ||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
if( n == 0 ||
|
||||||
ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ||
|
mbedtls_ssl_get_renego_status( ssl ) != MBEDTLS_SSL_INITIAL_HANDSHAKE ||
|
||||||
#endif
|
|
||||||
ssl->session_negotiate->ciphersuite != i ||
|
ssl->session_negotiate->ciphersuite != i ||
|
||||||
ssl->session_negotiate->compression != comp ||
|
ssl->session_negotiate->compression != comp ||
|
||||||
ssl->session_negotiate->id_len != n ||
|
ssl->session_negotiate->id_len != n ||
|
||||||
memcmp( ssl->session_negotiate->id, buf + 35, n ) != 0 )
|
memcmp( ssl->session_negotiate->id, buf + 35, n ) != 0 )
|
||||||
{
|
{
|
||||||
ssl->state++;
|
|
||||||
ssl->handshake->resume = 0;
|
ssl->handshake->resume = 0;
|
||||||
#if defined(MBEDTLS_HAVE_TIME)
|
|
||||||
ssl->session_negotiate->start = mbedtls_time( NULL );
|
|
||||||
#endif
|
|
||||||
ssl->session_negotiate->ciphersuite = i;
|
|
||||||
ssl->session_negotiate->compression = comp;
|
|
||||||
ssl->session_negotiate->id_len = n;
|
|
||||||
memcpy( ssl->session_negotiate->id, buf + 35, n );
|
|
||||||
}
|
}
|
||||||
else
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
|
|
||||||
|
if( mbedtls_ssl_handshake_get_resume( ssl->handshake ) == 1 )
|
||||||
{
|
{
|
||||||
|
/* Resume a session */
|
||||||
ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC;
|
ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC;
|
||||||
|
|
||||||
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
|
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
|
||||||
|
@ -1829,9 +1831,21 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl )
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Start a new session */
|
||||||
|
ssl->state++;
|
||||||
|
#if defined(MBEDTLS_HAVE_TIME)
|
||||||
|
ssl->session_negotiate->start = mbedtls_time( NULL );
|
||||||
|
#endif
|
||||||
|
ssl->session_negotiate->ciphersuite = i;
|
||||||
|
ssl->session_negotiate->compression = comp;
|
||||||
|
ssl->session_negotiate->id_len = n;
|
||||||
|
memcpy( ssl->session_negotiate->id, buf + 35, n );
|
||||||
|
}
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed",
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed",
|
||||||
ssl->handshake->resume ? "a" : "no" ) );
|
mbedtls_ssl_handshake_get_resume( ssl->handshake ) ? "a" : "no" ) );
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %04x", i ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen ciphersuite: %04x", i ) );
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, compress alg.: %d", buf[37 + n] ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, compress alg.: %d", buf[37 + n] ) );
|
||||||
|
|
|
@ -1341,16 +1341,12 @@ read_record_header:
|
||||||
* otherwise read it ourselves manually in order to support SSLv2
|
* otherwise read it ourselves manually in order to support SSLv2
|
||||||
* ClientHello, which doesn't use the same record layer format.
|
* ClientHello, which doesn't use the same record layer format.
|
||||||
*/
|
*/
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
if( mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE &&
|
||||||
if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
( ret = mbedtls_ssl_fetch_input( ssl, 5 ) ) != 0 )
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if( ( ret = mbedtls_ssl_fetch_input( ssl, 5 ) ) != 0 )
|
/* No alert on a read error. */
|
||||||
{
|
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret );
|
||||||
/* No alert on a read error. */
|
return( ret );
|
||||||
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_fetch_input", ret );
|
|
||||||
return( ret );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = ssl->in_hdr;
|
buf = ssl->in_hdr;
|
||||||
|
@ -1405,11 +1401,8 @@ read_record_header:
|
||||||
/* For DTLS if this is the initial handshake, remember the client sequence
|
/* For DTLS if this is the initial handshake, remember the client sequence
|
||||||
* number to use it in our next message (RFC 6347 4.2.1) */
|
* number to use it in our next message (RFC 6347 4.2.1) */
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport )
|
if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) &&
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
||||||
&& ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
/* Epoch should be 0 for initial handshakes */
|
/* Epoch should be 0 for initial handshakes */
|
||||||
if( ssl->in_ctr[0] != 0 || ssl->in_ctr[1] != 0 )
|
if( ssl->in_ctr[0] != 0 || ssl->in_ctr[1] != 0 )
|
||||||
|
@ -1670,11 +1663,8 @@ read_record_header:
|
||||||
buf + cookie_offset + 1, cookie_len );
|
buf + cookie_offset + 1, cookie_len );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY)
|
#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY)
|
||||||
if( ssl->conf->f_cookie_check != NULL
|
if( ssl->conf->f_cookie_check != NULL &&
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE )
|
||||||
&& ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if( ssl->conf->f_cookie_check( ssl->conf->p_cookie,
|
if( ssl->conf->f_cookie_check( ssl->conf->p_cookie,
|
||||||
buf + cookie_offset + 1, cookie_len,
|
buf + cookie_offset + 1, cookie_len,
|
||||||
|
@ -2691,15 +2681,14 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, random bytes", buf + 6, 32 );
|
MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, random bytes", buf + 6, 32 );
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
/*
|
/*
|
||||||
* Resume is 0 by default, see ssl_handshake_init().
|
* Resume is 0 by default, see ssl_handshake_init().
|
||||||
* It may be already set to 1 by ssl_parse_session_ticket_ext().
|
* It may be already set to 1 by ssl_parse_session_ticket_ext().
|
||||||
* If not, try looking up session ID in our cache.
|
* If not, try looking up session ID in our cache.
|
||||||
*/
|
*/
|
||||||
if( ssl->handshake->resume == 0 &&
|
if( mbedtls_ssl_handshake_get_resume( ssl->handshake ) == 0 &&
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
mbedtls_ssl_get_renego_status( ssl ) == MBEDTLS_SSL_INITIAL_HANDSHAKE &&
|
||||||
ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE &&
|
|
||||||
#endif
|
|
||||||
ssl->session_negotiate->id_len != 0 &&
|
ssl->session_negotiate->id_len != 0 &&
|
||||||
ssl->conf->f_get_cache != NULL &&
|
ssl->conf->f_get_cache != NULL &&
|
||||||
ssl->conf->f_get_cache( ssl->conf->p_cache, ssl->session_negotiate ) == 0 )
|
ssl->conf->f_get_cache( ssl->conf->p_cache, ssl->session_negotiate ) == 0 )
|
||||||
|
@ -2707,8 +2696,25 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "session successfully restored from cache" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "session successfully restored from cache" ) );
|
||||||
ssl->handshake->resume = 1;
|
ssl->handshake->resume = 1;
|
||||||
}
|
}
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
if( ssl->handshake->resume == 0 )
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
|
if( mbedtls_ssl_handshake_get_resume( ssl->handshake ) == 1 )
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Resuming a session
|
||||||
|
*/
|
||||||
|
n = ssl->session_negotiate->id_len;
|
||||||
|
ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC;
|
||||||
|
|
||||||
|
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
|
||||||
|
{
|
||||||
|
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret );
|
||||||
|
return( ret );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* New session, create a new session id,
|
* New session, create a new session id,
|
||||||
|
@ -2735,20 +2741,6 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Resuming a session
|
|
||||||
*/
|
|
||||||
n = ssl->session_negotiate->id_len;
|
|
||||||
ssl->state = MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC;
|
|
||||||
|
|
||||||
if( ( ret = mbedtls_ssl_derive_keys( ssl ) ) != 0 )
|
|
||||||
{
|
|
||||||
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_derive_keys", ret );
|
|
||||||
return( ret );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 38 . 38 session id length
|
* 38 . 38 session id length
|
||||||
|
@ -2765,7 +2757,7 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl )
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, session id len.: %d", n ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, session id len.: %d", n ) );
|
||||||
MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, session id", buf + 39, n );
|
MBEDTLS_SSL_DEBUG_BUF( 3, "server hello, session id", buf + 39, n );
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed",
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "%s session has been resumed",
|
||||||
ssl->handshake->resume ? "a" : "no" ) );
|
mbedtls_ssl_handshake_get_resume( ssl->handshake ) ? "a" : "no" ) );
|
||||||
|
|
||||||
*p++ = (unsigned char)( ssl->session_negotiate->ciphersuite >> 8 );
|
*p++ = (unsigned char)( ssl->session_negotiate->ciphersuite >> 8 );
|
||||||
*p++ = (unsigned char)( ssl->session_negotiate->ciphersuite );
|
*p++ = (unsigned char)( ssl->session_negotiate->ciphersuite );
|
||||||
|
|
|
@ -1263,11 +1263,13 @@ static int ssl_compute_master( mbedtls_ssl_handshake_params *handshake,
|
||||||
(void) ssl;
|
(void) ssl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
if( handshake->resume != 0 )
|
if( handshake->resume != 0 )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "no premaster (session resumed)" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "no premaster (session resumed)" ) );
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_BUF( 3, "premaster secret", handshake->premaster,
|
MBEDTLS_SSL_DEBUG_BUF( 3, "premaster secret", handshake->premaster,
|
||||||
handshake->pmslen );
|
handshake->pmslen );
|
||||||
|
@ -7285,8 +7287,6 @@ static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl )
|
||||||
|
|
||||||
void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl )
|
void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl )
|
||||||
{
|
{
|
||||||
int resume = ssl->handshake->resume;
|
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup" ) );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
#if defined(MBEDTLS_SSL_RENEGOTIATION)
|
||||||
|
@ -7314,16 +7314,18 @@ void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl )
|
||||||
ssl->session = ssl->session_negotiate;
|
ssl->session = ssl->session_negotiate;
|
||||||
ssl->session_negotiate = NULL;
|
ssl->session_negotiate = NULL;
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
/*
|
/*
|
||||||
* Add cache entry
|
* Add cache entry
|
||||||
*/
|
*/
|
||||||
if( ssl->conf->f_set_cache != NULL &&
|
if( ssl->conf->f_set_cache != NULL &&
|
||||||
ssl->session->id_len != 0 &&
|
ssl->session->id_len != 0 &&
|
||||||
resume == 0 )
|
ssl->handshake->resume == 0 )
|
||||||
{
|
{
|
||||||
if( ssl->conf->f_set_cache( ssl->conf->p_cache, ssl->session ) != 0 )
|
if( ssl->conf->f_set_cache( ssl->conf->p_cache, ssl->session ) != 0 )
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "cache did not store session" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "cache did not store session" ) );
|
||||||
}
|
}
|
||||||
|
#endif /* MBEDTLS_SSL_SRV_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) &&
|
if( MBEDTLS_SSL_TRANSPORT_IS_DTLS( ssl->conf->transport ) &&
|
||||||
|
@ -7372,6 +7374,7 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
|
||||||
ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;
|
ssl->out_msgtype = MBEDTLS_SSL_MSG_HANDSHAKE;
|
||||||
ssl->out_msg[0] = MBEDTLS_SSL_HS_FINISHED;
|
ssl->out_msg[0] = MBEDTLS_SSL_HS_FINISHED;
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
/*
|
/*
|
||||||
* In case of session resuming, invert the client and server
|
* In case of session resuming, invert the client and server
|
||||||
* ChangeCipherSpec messages order.
|
* ChangeCipherSpec messages order.
|
||||||
|
@ -7388,6 +7391,7 @@ int mbedtls_ssl_write_finished( mbedtls_ssl_context *ssl )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
ssl->state++;
|
ssl->state++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -7528,6 +7532,7 @@ int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl )
|
||||||
memcpy( ssl->peer_verify_data, buf, hash_len );
|
memcpy( ssl->peer_verify_data, buf, hash_len );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
if( ssl->handshake->resume != 0 )
|
if( ssl->handshake->resume != 0 )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_SSL_CLI_C)
|
#if defined(MBEDTLS_SSL_CLI_C)
|
||||||
|
@ -7540,6 +7545,7 @@ int mbedtls_ssl_parse_finished( mbedtls_ssl_context *ssl )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
ssl->state++;
|
ssl->state++;
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||||
|
@ -8164,7 +8170,7 @@ void mbedtls_ssl_set_timer_cb( mbedtls_ssl_context *ssl,
|
||||||
ssl_set_timer( ssl, 0 );
|
ssl_set_timer( ssl, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SRV_C)
|
#if defined(MBEDTLS_SSL_SRV_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf,
|
void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf,
|
||||||
void *p_cache,
|
void *p_cache,
|
||||||
int (*f_get_cache)(void *, mbedtls_ssl_session *),
|
int (*f_get_cache)(void *, mbedtls_ssl_session *),
|
||||||
|
@ -8174,9 +8180,9 @@ void mbedtls_ssl_conf_session_cache( mbedtls_ssl_config *conf,
|
||||||
conf->f_get_cache = f_get_cache;
|
conf->f_get_cache = f_get_cache;
|
||||||
conf->f_set_cache = f_set_cache;
|
conf->f_set_cache = f_set_cache;
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_SRV_C */
|
#endif /* MBEDTLS_SSL_SRV_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_CLI_C)
|
#if defined(MBEDTLS_SSL_CLI_C) && !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session )
|
int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session *session )
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -8197,7 +8203,7 @@ int mbedtls_ssl_set_session( mbedtls_ssl_context *ssl, const mbedtls_ssl_session
|
||||||
|
|
||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_CLI_C */
|
#endif /* MBEDTLS_SSL_CLI_C && !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
|
|
||||||
void mbedtls_ssl_conf_ciphersuites( mbedtls_ssl_config *conf,
|
void mbedtls_ssl_conf_ciphersuites( mbedtls_ssl_config *conf,
|
||||||
const int *ciphersuites )
|
const int *ciphersuites )
|
||||||
|
|
|
@ -513,6 +513,12 @@ static const char *features[] = {
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||||
"MBEDTLS_SSL_SESSION_TICKETS",
|
"MBEDTLS_SSL_SESSION_TICKETS",
|
||||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||||
|
#if defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
|
"MBEDTLS_SSL_NO_SESSION_CACHE",
|
||||||
|
#endif /* MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
#if defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
|
"MBEDTLS_SSL_NO_SESSION_RESUMPTION",
|
||||||
|
#endif /* MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||||
"MBEDTLS_SSL_EXPORT_KEYS",
|
"MBEDTLS_SSL_EXPORT_KEYS",
|
||||||
#endif /* MBEDTLS_SSL_EXPORT_KEYS */
|
#endif /* MBEDTLS_SSL_EXPORT_KEYS */
|
||||||
|
|
|
@ -236,11 +236,11 @@ int main( void )
|
||||||
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
||||||
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
||||||
mbedtls_ssl_cache_get,
|
mbedtls_ssl_cache_get,
|
||||||
mbedtls_ssl_cache_set );
|
mbedtls_ssl_cache_set );
|
||||||
#endif
|
#endif /* MBEDTLS_SSL_CACHE_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL );
|
mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL );
|
||||||
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
|
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
|
||||||
|
|
|
@ -1410,6 +1410,22 @@ int query_config( const char *config )
|
||||||
}
|
}
|
||||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
|
if( strcmp( "MBEDTLS_SSL_NO_SESSION_CACHE", config ) == 0 )
|
||||||
|
{
|
||||||
|
MACRO_EXPANSION_TO_STR( MBEDTLS_SSL_NO_SESSION_CACHE );
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
#endif /* MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
|
if( strcmp( "MBEDTLS_SSL_NO_SESSION_RESUMPTION", config ) == 0 )
|
||||||
|
{
|
||||||
|
MACRO_EXPANSION_TO_STR( MBEDTLS_SSL_NO_SESSION_RESUMPTION );
|
||||||
|
return( 0 );
|
||||||
|
}
|
||||||
|
#endif /* MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
#if defined(MBEDTLS_SSL_EXPORT_KEYS)
|
||||||
if( strcmp( "MBEDTLS_SSL_EXPORT_KEYS", config ) == 0 )
|
if( strcmp( "MBEDTLS_SSL_EXPORT_KEYS", config ) == 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2545,12 +2545,14 @@ reconnect:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_RESUMPTION)
|
||||||
if( ( ret = mbedtls_ssl_set_session( &ssl, &saved_session ) ) != 0 )
|
if( ( ret = mbedtls_ssl_set_session( &ssl, &saved_session ) ) != 0 )
|
||||||
{
|
{
|
||||||
mbedtls_printf( " failed\n ! mbedtls_ssl_set_session returned -0x%x\n\n",
|
mbedtls_printf( " failed\n ! mbedtls_ssl_set_session returned -0x%x\n\n",
|
||||||
-ret );
|
-ret );
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_RESUMPTION */
|
||||||
|
|
||||||
if( ( ret = mbedtls_net_connect( &server_fd,
|
if( ( ret = mbedtls_net_connect( &server_fd,
|
||||||
opt.server_addr, opt.server_port,
|
opt.server_addr, opt.server_port,
|
||||||
|
|
|
@ -224,11 +224,11 @@ int main( void )
|
||||||
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
|
||||||
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C) && !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
||||||
mbedtls_ssl_cache_get,
|
mbedtls_ssl_cache_get,
|
||||||
mbedtls_ssl_cache_set );
|
mbedtls_ssl_cache_set );
|
||||||
#endif
|
#endif /* MBEDTLS_SSL_CACHE_C && !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
|
|
||||||
mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL );
|
mbedtls_ssl_conf_ca_chain( &conf, srvcert.next, NULL );
|
||||||
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
|
if( ( ret = mbedtls_ssl_conf_own_cert( &conf, &srvcert, &pkey ) ) != 0 )
|
||||||
|
|
|
@ -2542,9 +2542,11 @@ int main( int argc, char *argv[] )
|
||||||
if( opt.cache_timeout != -1 )
|
if( opt.cache_timeout != -1 )
|
||||||
mbedtls_ssl_cache_set_timeout( &cache, opt.cache_timeout );
|
mbedtls_ssl_cache_set_timeout( &cache, opt.cache_timeout );
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_SSL_NO_SESSION_CACHE)
|
||||||
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
mbedtls_ssl_conf_session_cache( &conf, &cache,
|
||||||
mbedtls_ssl_cache_get,
|
mbedtls_ssl_cache_get,
|
||||||
mbedtls_ssl_cache_set );
|
mbedtls_ssl_cache_set );
|
||||||
|
#endif /* !MBEDTLS_SSL_NO_SESSION_CACHE */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||||
|
|
|
@ -32,6 +32,8 @@
|
||||||
# MBEDTLS_REMOVE_3DES_CIPHERSUITES
|
# MBEDTLS_REMOVE_3DES_CIPHERSUITES
|
||||||
# MBEDTLS_SSL_HW_RECORD_ACCEL
|
# MBEDTLS_SSL_HW_RECORD_ACCEL
|
||||||
# MBEDTLS_SSL_PROTO_NO_DTLS
|
# MBEDTLS_SSL_PROTO_NO_DTLS
|
||||||
|
# MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
|
# MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
# MBEDTLS_RSA_NO_CRT
|
# MBEDTLS_RSA_NO_CRT
|
||||||
# MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
|
# MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
|
||||||
# MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
# MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
||||||
|
@ -95,6 +97,8 @@ MBEDTLS_REMOVE_ARC4_CIPHERSUITES
|
||||||
MBEDTLS_REMOVE_3DES_CIPHERSUITES
|
MBEDTLS_REMOVE_3DES_CIPHERSUITES
|
||||||
MBEDTLS_SSL_HW_RECORD_ACCEL
|
MBEDTLS_SSL_HW_RECORD_ACCEL
|
||||||
MBEDTLS_SSL_PROTO_NO_TLS
|
MBEDTLS_SSL_PROTO_NO_TLS
|
||||||
|
MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
|
MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
|
MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
|
||||||
MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
|
||||||
MBEDTLS_X509_REMOVE_INFO
|
MBEDTLS_X509_REMOVE_INFO
|
||||||
|
|
|
@ -682,6 +682,21 @@ component_test_rsa_no_crt () {
|
||||||
if_build_succeeded tests/compat.sh -t RSA
|
if_build_succeeded tests/compat.sh -t RSA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component_test_no_resumption () {
|
||||||
|
msg "build: Default + MBEDTLS_SSL_NO_SESSION_RESUMPTION (ASan build)" # ~ 6 min
|
||||||
|
scripts/config.pl unset MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
scripts/config.pl set MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
|
scripts/config.pl set MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||||
|
make
|
||||||
|
|
||||||
|
msg "test: MBEDTLS_SSL_NO_SESSION_RESUMPTION - main suites (inc. selftests) (ASan build)" # ~ 50s
|
||||||
|
make test
|
||||||
|
|
||||||
|
msg "test: MBEDTLS_SSL_NO_SESSION_RESUMPTION - ssl-opt.sh (ASan build)" # ~ 6 min
|
||||||
|
if_build_succeeded tests/ssl-opt.sh
|
||||||
|
}
|
||||||
|
|
||||||
component_test_small_ssl_out_content_len () {
|
component_test_small_ssl_out_content_len () {
|
||||||
msg "build: small SSL_OUT_CONTENT_LEN (ASan build)"
|
msg "build: small SSL_OUT_CONTENT_LEN (ASan build)"
|
||||||
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 16384
|
scripts/config.pl set MBEDTLS_SSL_IN_CONTENT_LEN 16384
|
||||||
|
|
|
@ -2130,6 +2130,9 @@ run_test "Fallback SCSV: end of list" \
|
||||||
-s "inapropriate fallback"
|
-s "inapropriate fallback"
|
||||||
|
|
||||||
## Here the expected response is a valid ServerHello prefix, up to the random.
|
## Here the expected response is a valid ServerHello prefix, up to the random.
|
||||||
|
## Due to the way the clienthello was generated, this currently needs the
|
||||||
|
## server to have support for session tickets.
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
requires_openssl_with_fallback_scsv
|
requires_openssl_with_fallback_scsv
|
||||||
run_test "Fallback SCSV: not in list" \
|
run_test "Fallback SCSV: not in list" \
|
||||||
"$P_SRV debug_level=2" \
|
"$P_SRV debug_level=2" \
|
||||||
|
@ -2206,6 +2209,8 @@ run_test "CBC Record splitting: TLS 1.0, splitting, nbio" \
|
||||||
|
|
||||||
# Tests for Session Tickets
|
# Tests for Session Tickets
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets: basic" \
|
run_test "Session resume using tickets: basic" \
|
||||||
"$P_SRV debug_level=3 tickets=1" \
|
"$P_SRV debug_level=3 tickets=1" \
|
||||||
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
||||||
|
@ -2220,6 +2225,8 @@ run_test "Session resume using tickets: basic" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets: cache disabled" \
|
run_test "Session resume using tickets: cache disabled" \
|
||||||
"$P_SRV debug_level=3 tickets=1 cache_max=0" \
|
"$P_SRV debug_level=3 tickets=1 cache_max=0" \
|
||||||
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
||||||
|
@ -2234,6 +2241,8 @@ run_test "Session resume using tickets: cache disabled" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets: timeout" \
|
run_test "Session resume using tickets: timeout" \
|
||||||
"$P_SRV debug_level=3 tickets=1 cache_max=0 ticket_timeout=1" \
|
"$P_SRV debug_level=3 tickets=1 cache_max=0 ticket_timeout=1" \
|
||||||
"$P_CLI debug_level=3 tickets=1 reconnect=1 reco_delay=2" \
|
"$P_CLI debug_level=3 tickets=1 reconnect=1 reco_delay=2" \
|
||||||
|
@ -2248,6 +2257,8 @@ run_test "Session resume using tickets: timeout" \
|
||||||
-S "a session has been resumed" \
|
-S "a session has been resumed" \
|
||||||
-C "a session has been resumed"
|
-C "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets: session copy" \
|
run_test "Session resume using tickets: session copy" \
|
||||||
"$P_SRV debug_level=3 tickets=1 cache_max=0" \
|
"$P_SRV debug_level=3 tickets=1 cache_max=0" \
|
||||||
"$P_CLI debug_level=3 tickets=1 reconnect=1 reco_mode=0" \
|
"$P_CLI debug_level=3 tickets=1 reconnect=1 reco_mode=0" \
|
||||||
|
@ -2262,6 +2273,8 @@ run_test "Session resume using tickets: session copy" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets: openssl server" \
|
run_test "Session resume using tickets: openssl server" \
|
||||||
"$O_SRV" \
|
"$O_SRV" \
|
||||||
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
||||||
|
@ -2271,6 +2284,8 @@ run_test "Session resume using tickets: openssl server" \
|
||||||
-c "parse new session ticket" \
|
-c "parse new session ticket" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets: openssl client" \
|
run_test "Session resume using tickets: openssl client" \
|
||||||
"$P_SRV debug_level=3 tickets=1" \
|
"$P_SRV debug_level=3 tickets=1" \
|
||||||
"( $O_CLI -sess_out $SESSION; \
|
"( $O_CLI -sess_out $SESSION; \
|
||||||
|
@ -2285,6 +2300,8 @@ run_test "Session resume using tickets: openssl client" \
|
||||||
|
|
||||||
# Tests for Session Tickets with DTLS
|
# Tests for Session Tickets with DTLS
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets, DTLS: basic" \
|
run_test "Session resume using tickets, DTLS: basic" \
|
||||||
"$P_SRV debug_level=3 dtls=1 tickets=1" \
|
"$P_SRV debug_level=3 dtls=1 tickets=1" \
|
||||||
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1" \
|
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1" \
|
||||||
|
@ -2299,6 +2316,8 @@ run_test "Session resume using tickets, DTLS: basic" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets, DTLS: cache disabled" \
|
run_test "Session resume using tickets, DTLS: cache disabled" \
|
||||||
"$P_SRV debug_level=3 dtls=1 tickets=1 cache_max=0" \
|
"$P_SRV debug_level=3 dtls=1 tickets=1 cache_max=0" \
|
||||||
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1" \
|
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1" \
|
||||||
|
@ -2313,6 +2332,8 @@ run_test "Session resume using tickets, DTLS: cache disabled" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets, DTLS: timeout" \
|
run_test "Session resume using tickets, DTLS: timeout" \
|
||||||
"$P_SRV debug_level=3 dtls=1 tickets=1 cache_max=0 ticket_timeout=1" \
|
"$P_SRV debug_level=3 dtls=1 tickets=1 cache_max=0 ticket_timeout=1" \
|
||||||
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1 reco_delay=2" \
|
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1 reco_delay=2" \
|
||||||
|
@ -2327,6 +2348,8 @@ run_test "Session resume using tickets, DTLS: timeout" \
|
||||||
-S "a session has been resumed" \
|
-S "a session has been resumed" \
|
||||||
-C "a session has been resumed"
|
-C "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets, DTLS: session copy" \
|
run_test "Session resume using tickets, DTLS: session copy" \
|
||||||
"$P_SRV debug_level=3 dtls=1 tickets=1 cache_max=0" \
|
"$P_SRV debug_level=3 dtls=1 tickets=1 cache_max=0" \
|
||||||
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1 reco_mode=0" \
|
"$P_CLI debug_level=3 dtls=1 tickets=1 reconnect=1 reco_mode=0" \
|
||||||
|
@ -2341,6 +2364,8 @@ run_test "Session resume using tickets, DTLS: session copy" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets, DTLS: openssl server" \
|
run_test "Session resume using tickets, DTLS: openssl server" \
|
||||||
"$O_SRV -dtls1" \
|
"$O_SRV -dtls1" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=1 reconnect=1" \
|
"$P_CLI dtls=1 debug_level=3 tickets=1 reconnect=1" \
|
||||||
|
@ -2350,6 +2375,8 @@ run_test "Session resume using tickets, DTLS: openssl server" \
|
||||||
-c "parse new session ticket" \
|
-c "parse new session ticket" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "Session resume using tickets, DTLS: openssl client" \
|
run_test "Session resume using tickets, DTLS: openssl client" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=1" \
|
"$P_SRV dtls=1 debug_level=3 tickets=1" \
|
||||||
"( $O_CLI -dtls1 -sess_out $SESSION; \
|
"( $O_CLI -dtls1 -sess_out $SESSION; \
|
||||||
|
@ -2364,6 +2391,9 @@ run_test "Session resume using tickets, DTLS: openssl client" \
|
||||||
|
|
||||||
# Tests for Session Resume based on session-ID and cache
|
# Tests for Session Resume based on session-ID and cache
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: tickets enabled on client" \
|
run_test "Session resume using cache: tickets enabled on client" \
|
||||||
"$P_SRV debug_level=3 tickets=0" \
|
"$P_SRV debug_level=3 tickets=0" \
|
||||||
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=1 reconnect=1" \
|
||||||
|
@ -2378,6 +2408,9 @@ run_test "Session resume using cache: tickets enabled on client" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: tickets enabled on server" \
|
run_test "Session resume using cache: tickets enabled on server" \
|
||||||
"$P_SRV debug_level=3 tickets=1" \
|
"$P_SRV debug_level=3 tickets=1" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2392,6 +2425,8 @@ run_test "Session resume using cache: tickets enabled on server" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: cache_max=0" \
|
run_test "Session resume using cache: cache_max=0" \
|
||||||
"$P_SRV debug_level=3 tickets=0 cache_max=0" \
|
"$P_SRV debug_level=3 tickets=0 cache_max=0" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2401,6 +2436,8 @@ run_test "Session resume using cache: cache_max=0" \
|
||||||
-S "a session has been resumed" \
|
-S "a session has been resumed" \
|
||||||
-C "a session has been resumed"
|
-C "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: cache_max=1" \
|
run_test "Session resume using cache: cache_max=1" \
|
||||||
"$P_SRV debug_level=3 tickets=0 cache_max=1" \
|
"$P_SRV debug_level=3 tickets=0 cache_max=1" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2410,6 +2447,8 @@ run_test "Session resume using cache: cache_max=1" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: timeout > delay" \
|
run_test "Session resume using cache: timeout > delay" \
|
||||||
"$P_SRV debug_level=3 tickets=0" \
|
"$P_SRV debug_level=3 tickets=0" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=0" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=0" \
|
||||||
|
@ -2419,6 +2458,8 @@ run_test "Session resume using cache: timeout > delay" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: timeout < delay" \
|
run_test "Session resume using cache: timeout < delay" \
|
||||||
"$P_SRV debug_level=3 tickets=0 cache_timeout=1" \
|
"$P_SRV debug_level=3 tickets=0 cache_timeout=1" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
||||||
|
@ -2428,6 +2469,8 @@ run_test "Session resume using cache: timeout < delay" \
|
||||||
-S "a session has been resumed" \
|
-S "a session has been resumed" \
|
||||||
-C "a session has been resumed"
|
-C "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: no timeout" \
|
run_test "Session resume using cache: no timeout" \
|
||||||
"$P_SRV debug_level=3 tickets=0 cache_timeout=0" \
|
"$P_SRV debug_level=3 tickets=0 cache_timeout=0" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
||||||
|
@ -2437,6 +2480,8 @@ run_test "Session resume using cache: no timeout" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: session copy" \
|
run_test "Session resume using cache: session copy" \
|
||||||
"$P_SRV debug_level=3 tickets=0" \
|
"$P_SRV debug_level=3 tickets=0" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_mode=0" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1 reco_mode=0" \
|
||||||
|
@ -2446,6 +2491,8 @@ run_test "Session resume using cache: session copy" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: openssl client" \
|
run_test "Session resume using cache: openssl client" \
|
||||||
"$P_SRV debug_level=3 tickets=0" \
|
"$P_SRV debug_level=3 tickets=0" \
|
||||||
"( $O_CLI -sess_out $SESSION; \
|
"( $O_CLI -sess_out $SESSION; \
|
||||||
|
@ -2458,6 +2505,8 @@ run_test "Session resume using cache: openssl client" \
|
||||||
-S "session successfully restored from ticket" \
|
-S "session successfully restored from ticket" \
|
||||||
-s "a session has been resumed"
|
-s "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache: openssl server" \
|
run_test "Session resume using cache: openssl server" \
|
||||||
"$O_SRV" \
|
"$O_SRV" \
|
||||||
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2468,6 +2517,9 @@ run_test "Session resume using cache: openssl server" \
|
||||||
|
|
||||||
# Tests for Session Resume based on session-ID and cache, DTLS
|
# Tests for Session Resume based on session-ID and cache, DTLS
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: tickets enabled on client" \
|
run_test "Session resume using cache, DTLS: tickets enabled on client" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=1 reconnect=1" \
|
"$P_CLI dtls=1 debug_level=3 tickets=1 reconnect=1" \
|
||||||
|
@ -2482,6 +2534,9 @@ run_test "Session resume using cache, DTLS: tickets enabled on client" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: tickets enabled on server" \
|
run_test "Session resume using cache, DTLS: tickets enabled on server" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=1" \
|
"$P_SRV dtls=1 debug_level=3 tickets=1" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2496,6 +2551,8 @@ run_test "Session resume using cache, DTLS: tickets enabled on server" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: cache_max=0" \
|
run_test "Session resume using cache, DTLS: cache_max=0" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_max=0" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_max=0" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2505,6 +2562,8 @@ run_test "Session resume using cache, DTLS: cache_max=0" \
|
||||||
-S "a session has been resumed" \
|
-S "a session has been resumed" \
|
||||||
-C "a session has been resumed"
|
-C "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: cache_max=1" \
|
run_test "Session resume using cache, DTLS: cache_max=1" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_max=1" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_max=1" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -2514,6 +2573,8 @@ run_test "Session resume using cache, DTLS: cache_max=1" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: timeout > delay" \
|
run_test "Session resume using cache, DTLS: timeout > delay" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_delay=0" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_delay=0" \
|
||||||
|
@ -2523,6 +2584,8 @@ run_test "Session resume using cache, DTLS: timeout > delay" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: timeout < delay" \
|
run_test "Session resume using cache, DTLS: timeout < delay" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_timeout=1" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_timeout=1" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
||||||
|
@ -2532,6 +2595,8 @@ run_test "Session resume using cache, DTLS: timeout < delay" \
|
||||||
-S "a session has been resumed" \
|
-S "a session has been resumed" \
|
||||||
-C "a session has been resumed"
|
-C "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: no timeout" \
|
run_test "Session resume using cache, DTLS: no timeout" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_timeout=0" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0 cache_timeout=0" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_delay=2" \
|
||||||
|
@ -2541,6 +2606,8 @@ run_test "Session resume using cache, DTLS: no timeout" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: session copy" \
|
run_test "Session resume using cache, DTLS: session copy" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_mode=0" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1 reco_mode=0" \
|
||||||
|
@ -2550,6 +2617,8 @@ run_test "Session resume using cache, DTLS: session copy" \
|
||||||
-s "a session has been resumed" \
|
-s "a session has been resumed" \
|
||||||
-c "a session has been resumed"
|
-c "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: openssl client" \
|
run_test "Session resume using cache, DTLS: openssl client" \
|
||||||
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
"$P_SRV dtls=1 debug_level=3 tickets=0" \
|
||||||
"( $O_CLI -dtls1 -sess_out $SESSION; \
|
"( $O_CLI -dtls1 -sess_out $SESSION; \
|
||||||
|
@ -2562,6 +2631,8 @@ run_test "Session resume using cache, DTLS: openssl client" \
|
||||||
-S "session successfully restored from ticket" \
|
-S "session successfully restored from ticket" \
|
||||||
-s "a session has been resumed"
|
-s "a session has been resumed"
|
||||||
|
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "Session resume using cache, DTLS: openssl server" \
|
run_test "Session resume using cache, DTLS: openssl server" \
|
||||||
"$O_SRV -dtls1" \
|
"$O_SRV -dtls1" \
|
||||||
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
"$P_CLI dtls=1 debug_level=3 tickets=0 reconnect=1" \
|
||||||
|
@ -7864,6 +7935,8 @@ run_test "DTLS reordering: Buffer out-of-order handshake message on server" \
|
||||||
-S "Injecting buffered CCS message" \
|
-S "Injecting buffered CCS message" \
|
||||||
-S "Remember CCS message"
|
-S "Remember CCS message"
|
||||||
|
|
||||||
|
# This needs session tickets; otherwise CCS is the first message in its flight
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
run_test "DTLS reordering: Buffer out-of-order CCS message on client"\
|
run_test "DTLS reordering: Buffer out-of-order CCS message on client"\
|
||||||
-p "$P_PXY delay_srv=NewSessionTicket" \
|
-p "$P_PXY delay_srv=NewSessionTicket" \
|
||||||
"$P_SRV dgram_packing=0 cookies=0 dtls=1 debug_level=2 \
|
"$P_SRV dgram_packing=0 cookies=0 dtls=1 debug_level=2 \
|
||||||
|
@ -8006,6 +8079,9 @@ run_test "DTLS proxy: 3d, max handshake, nbio" \
|
||||||
-c "HTTP/1.0 200 OK"
|
-c "HTTP/1.0 200 OK"
|
||||||
|
|
||||||
client_needs_more_time 4
|
client_needs_more_time 4
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "DTLS proxy: 3d, min handshake, resumption" \
|
run_test "DTLS proxy: 3d, min handshake, resumption" \
|
||||||
-p "$P_PXY drop=5 delay=5 duplicate=5" \
|
-p "$P_PXY drop=5 delay=5 duplicate=5" \
|
||||||
"$P_SRV dtls=1 dgram_packing=0 hs_timeout=500-10000 tickets=0 auth_mode=none \
|
"$P_SRV dtls=1 dgram_packing=0 hs_timeout=500-10000 tickets=0 auth_mode=none \
|
||||||
|
@ -8020,6 +8096,9 @@ run_test "DTLS proxy: 3d, min handshake, resumption" \
|
||||||
-c "HTTP/1.0 200 OK"
|
-c "HTTP/1.0 200 OK"
|
||||||
|
|
||||||
client_needs_more_time 4
|
client_needs_more_time 4
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_RESUMPTION
|
||||||
|
requires_config_enabled MBEDTLS_SSL_SESSION_TICKETS
|
||||||
|
requires_config_disabled MBEDTLS_SSL_NO_SESSION_CACHE
|
||||||
run_test "DTLS proxy: 3d, min handshake, resumption, nbio" \
|
run_test "DTLS proxy: 3d, min handshake, resumption, nbio" \
|
||||||
-p "$P_PXY drop=5 delay=5 duplicate=5" \
|
-p "$P_PXY drop=5 delay=5 duplicate=5" \
|
||||||
"$P_SRV dtls=1 dgram_packing=0 hs_timeout=500-10000 tickets=0 auth_mode=none \
|
"$P_SRV dtls=1 dgram_packing=0 hs_timeout=500-10000 tickets=0 auth_mode=none \
|
||||||
|
|
Loading…
Reference in a new issue