diff --git a/tests/fuzz/fuzz_client.c b/tests/fuzz/fuzz_client.c index f2eaa3d33..38ad2fd56 100644 --- a/tests/fuzz/fuzz_client.c +++ b/tests/fuzz/fuzz_client.c @@ -9,6 +9,7 @@ #include +#ifdef MBEDTLS_SSL_CLI_C static bool initialized = 0; #if defined(MBEDTLS_X509_CRT_PARSE_C) static mbedtls_x509_crt cacert; @@ -25,6 +26,7 @@ const char psk_id[] = "Client_identity"; #endif const char *pers = "fuzz_client"; +#endif //MBEDTLS_SSL_CLI_C int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { diff --git a/tests/fuzz/fuzz_dtlsclient.c b/tests/fuzz/fuzz_dtlsclient.c index 4205917c1..fb872ef74 100644 --- a/tests/fuzz/fuzz_dtlsclient.c +++ b/tests/fuzz/fuzz_dtlsclient.c @@ -11,14 +11,15 @@ #include "mbedtls/timing.h" +#ifdef MBEDTLS_SSL_CLI_C static bool initialized = 0; #if defined(MBEDTLS_X509_CRT_PARSE_C) static mbedtls_x509_crt cacert; #endif - const char *pers = "fuzz_dtlsclient"; -#endif +#endif // MBEDTLS_SSL_CLI_C +#endif // MBEDTLS_SSL_PROTO_DTLS diff --git a/tests/fuzz/fuzz_dtlsserver.c b/tests/fuzz/fuzz_dtlsserver.c index 619661f5e..ff9a60b72 100644 --- a/tests/fuzz/fuzz_dtlsserver.c +++ b/tests/fuzz/fuzz_dtlsserver.c @@ -12,6 +12,7 @@ #include "mbedtls/ssl_cookie.h" +#ifdef MBEDTLS_SSL_SRV_C const char *pers = "fuzz_dtlsserver"; const unsigned char client_ip[4] = {0x7F, 0, 0, 1}; static bool initialized = 0; @@ -19,7 +20,8 @@ static bool initialized = 0; static mbedtls_x509_crt srvcert; static mbedtls_pk_context pkey; #endif -#endif +#endif // MBEDTLS_SSL_SRV_C +#endif // MBEDTLS_SSL_PROTO_DTLS int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { #if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C) diff --git a/tests/fuzz/fuzz_server.c b/tests/fuzz/fuzz_server.c index 0a2f3a90c..d751a71f8 100644 --- a/tests/fuzz/fuzz_server.c +++ b/tests/fuzz/fuzz_server.c @@ -10,6 +10,7 @@ #include +#ifdef MBEDTLS_SSL_SRV_C const char *pers = "fuzz_server"; static bool initialized = 0; #if defined(MBEDTLS_X509_CRT_PARSE_C) @@ -25,6 +26,7 @@ const unsigned char psk[] = { }; const char psk_id[] = "Client_identity"; #endif +#endif // MBEDTLS_SSL_SRV_C int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {