mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-05-09 03:04:24 +02:00
Merge pull request #6374 from mprse/enc_types
Test TLS 1.2 builds with each encryption type
This commit is contained in:
@@ -42,7 +42,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
mbedtls_ssl_config conf;
|
||||
mbedtls_ctr_drbg_context ctr_drbg;
|
||||
mbedtls_entropy_context entropy;
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
mbedtls_ssl_ticket_context ticket_ctx;
|
||||
#endif
|
||||
unsigned char buf[4096];
|
||||
@@ -89,7 +89,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
}
|
||||
mbedtls_ssl_init( &ssl );
|
||||
mbedtls_ssl_config_init( &conf );
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
mbedtls_ssl_ticket_init( &ticket_ctx );
|
||||
#endif
|
||||
|
||||
@@ -114,7 +114,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
mbedtls_ssl_conf_alpn_protocols( &conf, alpn_list );
|
||||
}
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
if( options & 0x4 )
|
||||
{
|
||||
if( mbedtls_ssl_ticket_setup( &ticket_ctx,
|
||||
@@ -173,7 +173,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
}
|
||||
|
||||
exit:
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
mbedtls_ssl_ticket_free( &ticket_ctx );
|
||||
#endif
|
||||
mbedtls_entropy_free( &entropy );
|
||||
|
||||
@@ -49,7 +49,7 @@ int main( void )
|
||||
#include "mbedtls/ssl_cache.h"
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_TICKET_C)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
#include "mbedtls/ssl_ticket.h"
|
||||
#endif
|
||||
|
||||
@@ -284,7 +284,7 @@ int main( void )
|
||||
#else
|
||||
#define USAGE_CA_CALLBACK ""
|
||||
#endif /* MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK */
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
#define USAGE_TICKETS \
|
||||
" tickets=%%d default: 1 (enabled)\n" \
|
||||
" ticket_rotate=%%d default: 0 (disabled)\n" \
|
||||
@@ -292,7 +292,7 @@ int main( void )
|
||||
" ticket_aead=%%s default: \"AES-256-GCM\"\n"
|
||||
#else
|
||||
#define USAGE_TICKETS ""
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS */
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_TICKET_C */
|
||||
|
||||
#define USAGE_EAP_TLS \
|
||||
" eap_tls=%%d default: 0 (disabled)\n"
|
||||
@@ -1477,9 +1477,9 @@ int main( int argc, char *argv[] )
|
||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||
mbedtls_ssl_cache_context cache;
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
mbedtls_ssl_ticket_context ticket_ctx;
|
||||
#endif
|
||||
#endif /* MBEDTLS_SSL_SESSION_TICKETS && MBEDTLS_SSL_TICKET_C */
|
||||
#if defined(SNI_OPTION)
|
||||
sni_entry *sni_info = NULL;
|
||||
#endif
|
||||
@@ -1568,7 +1568,7 @@ int main( int argc, char *argv[] )
|
||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||
mbedtls_ssl_cache_init( &cache );
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
mbedtls_ssl_ticket_init( &ticket_ctx );
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_ALPN)
|
||||
@@ -2994,7 +2994,7 @@ int main( int argc, char *argv[] )
|
||||
mbedtls_ssl_cache_set );
|
||||
#endif
|
||||
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
if( opt.tickets != MBEDTLS_SSL_SESSION_TICKETS_DISABLED )
|
||||
{
|
||||
#if defined(MBEDTLS_HAVE_TIME)
|
||||
@@ -4305,7 +4305,7 @@ exit:
|
||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||
mbedtls_ssl_cache_free( &cache );
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||
mbedtls_ssl_ticket_free( &ticket_ctx );
|
||||
#endif
|
||||
#if defined(MBEDTLS_SSL_COOKIE_C)
|
||||
|
||||
Reference in New Issue
Block a user