commit
bb890177b3
|
@ -25,6 +25,8 @@
|
||||||
#include <wolfssl/options.h>
|
#include <wolfssl/options.h>
|
||||||
#include <wolfssl/ssl.h>
|
#include <wolfssl/ssl.h>
|
||||||
|
|
||||||
|
#define WC_MAX_FUZZ_INPUT_SZ 25000
|
||||||
|
|
||||||
/* testing wolfSSL_CTX_use_certificate_buffer with PEM as the filetype*/
|
/* testing wolfSSL_CTX_use_certificate_buffer with PEM as the filetype*/
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t sz)
|
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t sz)
|
||||||
|
@ -32,6 +34,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t sz)
|
||||||
WOLFSSL_CTX *ctx;
|
WOLFSSL_CTX *ctx;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* avoid 25s timeout with parsing large files */
|
||||||
|
if (sz > WS_MAX_FUZZ_INPUT_SZ) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
wolfSSL_Init();
|
wolfSSL_Init();
|
||||||
|
|
||||||
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
|
ctx = wolfSSL_CTX_new(wolfTLSv1_2_server_method());
|
||||||
|
|
Loading…
Reference in New Issue