Fix session tickets related build flags in fuzz_server and ssl_server2
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
parent
52a428b824
commit
68a01a6720
2 changed files with 9 additions and 9 deletions
|
@ -42,7 +42,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
mbedtls_ssl_config conf;
|
mbedtls_ssl_config conf;
|
||||||
mbedtls_ctr_drbg_context ctr_drbg;
|
mbedtls_ctr_drbg_context ctr_drbg;
|
||||||
mbedtls_entropy_context entropy;
|
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;
|
mbedtls_ssl_ticket_context ticket_ctx;
|
||||||
#endif
|
#endif
|
||||||
unsigned char buf[4096];
|
unsigned char buf[4096];
|
||||||
|
@ -89,7 +89,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
}
|
}
|
||||||
mbedtls_ssl_init( &ssl );
|
mbedtls_ssl_init( &ssl );
|
||||||
mbedtls_ssl_config_init( &conf );
|
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 );
|
mbedtls_ssl_ticket_init( &ticket_ctx );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
mbedtls_ssl_conf_alpn_protocols( &conf, alpn_list );
|
mbedtls_ssl_conf_alpn_protocols( &conf, alpn_list );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||||
if( options & 0x4 )
|
if( options & 0x4 )
|
||||||
{
|
{
|
||||||
if( mbedtls_ssl_ticket_setup( &ticket_ctx,
|
if( mbedtls_ssl_ticket_setup( &ticket_ctx,
|
||||||
|
@ -173,7 +173,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||||
mbedtls_ssl_ticket_free( &ticket_ctx );
|
mbedtls_ssl_ticket_free( &ticket_ctx );
|
||||||
#endif
|
#endif
|
||||||
mbedtls_entropy_free( &entropy );
|
mbedtls_entropy_free( &entropy );
|
||||||
|
|
|
@ -49,7 +49,7 @@ int main( void )
|
||||||
#include "mbedtls/ssl_cache.h"
|
#include "mbedtls/ssl_cache.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_SSL_TICKET_C)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||||
#include "mbedtls/ssl_ticket.h"
|
#include "mbedtls/ssl_ticket.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1404,7 +1404,7 @@ int main( int argc, char *argv[] )
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||||
mbedtls_ssl_cache_context cache;
|
mbedtls_ssl_cache_context cache;
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||||
mbedtls_ssl_ticket_context ticket_ctx;
|
mbedtls_ssl_ticket_context ticket_ctx;
|
||||||
#endif
|
#endif
|
||||||
#if defined(SNI_OPTION)
|
#if defined(SNI_OPTION)
|
||||||
|
@ -1495,7 +1495,7 @@ int main( int argc, char *argv[] )
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||||
mbedtls_ssl_cache_init( &cache );
|
mbedtls_ssl_cache_init( &cache );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||||
mbedtls_ssl_ticket_init( &ticket_ctx );
|
mbedtls_ssl_ticket_init( &ticket_ctx );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_ALPN)
|
#if defined(MBEDTLS_SSL_ALPN)
|
||||||
|
@ -2914,7 +2914,7 @@ int main( int argc, char *argv[] )
|
||||||
mbedtls_ssl_cache_set );
|
mbedtls_ssl_cache_set );
|
||||||
#endif
|
#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( opt.tickets != MBEDTLS_SSL_SESSION_TICKETS_DISABLED )
|
||||||
{
|
{
|
||||||
if( ( ret = mbedtls_ssl_ticket_setup( &ticket_ctx,
|
if( ( ret = mbedtls_ssl_ticket_setup( &ticket_ctx,
|
||||||
|
@ -4210,7 +4210,7 @@ exit:
|
||||||
#if defined(MBEDTLS_SSL_CACHE_C)
|
#if defined(MBEDTLS_SSL_CACHE_C)
|
||||||
mbedtls_ssl_cache_free( &cache );
|
mbedtls_ssl_cache_free( &cache );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
|
#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_TICKET_C)
|
||||||
mbedtls_ssl_ticket_free( &ticket_ctx );
|
mbedtls_ssl_ticket_free( &ticket_ctx );
|
||||||
#endif
|
#endif
|
||||||
#if defined(MBEDTLS_SSL_COOKIE_C)
|
#if defined(MBEDTLS_SSL_COOKIE_C)
|
||||||
|
|
Loading…
Reference in a new issue