David Horstmann | 4e0cc40 | 2021-11-29 18:55:16 +0000 | [diff] [blame] | 1 | #include "mbedtls/build_info.h" |
Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 2 | |
| 3 | #if defined(MBEDTLS_HAVE_TIME) |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 4 | #include "mbedtls/platform_time.h" |
Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 5 | #endif |
| 6 | #include <stddef.h> |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 7 | #include <stdint.h> |
| 8 | |
Gilles Peskine | 449bd83 | 2023-01-11 14:50:10 +0100 | [diff] [blame] | 9 | typedef struct fuzzBufferOffset { |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 10 | const uint8_t *Data; |
| 11 | size_t Size; |
| 12 | size_t Offset; |
| 13 | } fuzzBufferOffset_t; |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 14 | |
Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 15 | #if defined(MBEDTLS_HAVE_TIME) |
Gilles Peskine | 449bd83 | 2023-01-11 14:50:10 +0100 | [diff] [blame] | 16 | mbedtls_time_t dummy_constant_time(mbedtls_time_t *time); |
Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 17 | #endif |
Gowtham Suresh Kumar | 186731b | 2023-07-26 15:47:45 +0100 | [diff] [blame] | 18 | void dummy_init(void); |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 19 | |
Gilles Peskine | 449bd83 | 2023-01-11 14:50:10 +0100 | [diff] [blame] | 20 | int dummy_send(void *ctx, const unsigned char *buf, size_t len); |
| 21 | int fuzz_recv(void *ctx, unsigned char *buf, size_t len); |
| 22 | int dummy_random(void *p_rng, unsigned char *output, size_t output_len); |
| 23 | int dummy_entropy(void *data, unsigned char *output, size_t len); |
| 24 | int fuzz_recv_timeout(void *ctx, unsigned char *buf, size_t len, |
| 25 | uint32_t timeout); |
Michael Schuster | e708e86 | 2024-06-01 21:08:45 +0200 | [diff] [blame^] | 26 | |
| 27 | /* Implemented in the fuzz_*.c sources and required by onefile.c */ |
| 28 | int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); |