mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 19:25:42 +01:00
Adding ifdefs to avoid warnings for unused globals
This commit is contained in:
parent
cd2c127f75
commit
adc23e6132
@ -9,6 +9,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MBEDTLS_SSL_CLI_C
|
||||||
static bool initialized = 0;
|
static bool initialized = 0;
|
||||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||||
static mbedtls_x509_crt cacert;
|
static mbedtls_x509_crt cacert;
|
||||||
@ -25,6 +26,7 @@ const char psk_id[] = "Client_identity";
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *pers = "fuzz_client";
|
const char *pers = "fuzz_client";
|
||||||
|
#endif //MBEDTLS_SSL_CLI_C
|
||||||
|
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
|
@ -11,14 +11,15 @@
|
|||||||
#include "mbedtls/timing.h"
|
#include "mbedtls/timing.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MBEDTLS_SSL_CLI_C
|
||||||
static bool initialized = 0;
|
static bool initialized = 0;
|
||||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||||
static mbedtls_x509_crt cacert;
|
static mbedtls_x509_crt cacert;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const char *pers = "fuzz_dtlsclient";
|
const char *pers = "fuzz_dtlsclient";
|
||||||
#endif
|
#endif // MBEDTLS_SSL_CLI_C
|
||||||
|
#endif // MBEDTLS_SSL_PROTO_DTLS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "mbedtls/ssl_cookie.h"
|
#include "mbedtls/ssl_cookie.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MBEDTLS_SSL_SRV_C
|
||||||
const char *pers = "fuzz_dtlsserver";
|
const char *pers = "fuzz_dtlsserver";
|
||||||
const unsigned char client_ip[4] = {0x7F, 0, 0, 1};
|
const unsigned char client_ip[4] = {0x7F, 0, 0, 1};
|
||||||
static bool initialized = 0;
|
static bool initialized = 0;
|
||||||
@ -19,7 +20,8 @@ static bool initialized = 0;
|
|||||||
static mbedtls_x509_crt srvcert;
|
static mbedtls_x509_crt srvcert;
|
||||||
static mbedtls_pk_context pkey;
|
static mbedtls_pk_context pkey;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif // MBEDTLS_SSL_SRV_C
|
||||||
|
#endif // MBEDTLS_SSL_PROTO_DTLS
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
#if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C)
|
#if defined(MBEDTLS_SSL_PROTO_DTLS) && defined(MBEDTLS_SSL_SRV_C)
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef MBEDTLS_SSL_SRV_C
|
||||||
const char *pers = "fuzz_server";
|
const char *pers = "fuzz_server";
|
||||||
static bool initialized = 0;
|
static bool initialized = 0;
|
||||||
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
#if defined(MBEDTLS_X509_CRT_PARSE_C)
|
||||||
@ -25,6 +26,7 @@ const unsigned char psk[] = {
|
|||||||
};
|
};
|
||||||
const char psk_id[] = "Client_identity";
|
const char psk_id[] = "Client_identity";
|
||||||
#endif
|
#endif
|
||||||
|
#endif // MBEDTLS_SSL_SRV_C
|
||||||
|
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||||
|
Loading…
Reference in New Issue
Block a user