Protecting client/server fuzz targts with ifdefs
This commit is contained in:
parent
03e87d909d
commit
c32fd248e3
4 changed files with 14 additions and 2 deletions
|
@ -28,6 +28,7 @@ const char *pers = "fuzz_client";
|
|||
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#ifdef MBEDTLS_SSL_CLI_C
|
||||
int ret;
|
||||
size_t len;
|
||||
mbedtls_ssl_context ssl;
|
||||
|
@ -162,5 +163,10 @@ exit:
|
|||
mbedtls_ssl_config_free( &conf );
|
||||
mbedtls_ssl_free( &ssl );
|
||||
|
||||
#else
|
||||
(void) Data;
|
||||
(void) Size;
|
||||
#endif //MBEDTLS_SSL_CLI_C
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ const char *pers = "fuzz_dtlsclient";
|
|||
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_CLI_C)
|
||||
int ret;
|
||||
size_t len;
|
||||
mbedtls_ssl_context ssl;
|
||||
|
|
|
@ -22,7 +22,7 @@ static mbedtls_pk_context pkey;
|
|||
#endif
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS)
|
||||
#if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C)
|
||||
int ret;
|
||||
size_t len;
|
||||
mbedtls_ssl_context ssl;
|
||||
|
|
|
@ -28,6 +28,7 @@ const char psk_id[] = "Client_identity";
|
|||
|
||||
|
||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
#ifdef MBEDTLS_SSL_SRV_C
|
||||
int ret;
|
||||
size_t len;
|
||||
mbedtls_ssl_context ssl;
|
||||
|
@ -174,5 +175,10 @@ exit:
|
|||
mbedtls_ssl_config_free( &conf );
|
||||
mbedtls_ssl_free( &ssl );
|
||||
|
||||
#else
|
||||
(void) Data;
|
||||
(void) Size;
|
||||
#endif //MBEDTLS_SSL_SRV_C
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue