Ben Taylor | 80490a2 | 2025-06-04 08:24:01 +0100 | [diff] [blame] | 1 | #include "mbedtls/build_info.h" |
| 2 | |
| 3 | #if defined(MBEDTLS_HAVE_TIME) |
| 4 | #include "mbedtls/platform_time.h" |
| 5 | #endif |
| 6 | #include <stddef.h> |
| 7 | #include <stdint.h> |
| 8 | |
| 9 | typedef struct fuzzBufferOffset { |
| 10 | const uint8_t *Data; |
| 11 | size_t Size; |
| 12 | size_t Offset; |
| 13 | } fuzzBufferOffset_t; |
| 14 | |
| 15 | #if defined(MBEDTLS_HAVE_TIME) |
| 16 | mbedtls_time_t dummy_constant_time(mbedtls_time_t *time); |
| 17 | #endif |
| 18 | void dummy_init(void); |
| 19 | |
| 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); |
| 26 | |
| 27 | /* Implemented in the fuzz_*.c sources and required by onefile.c */ |
| 28 | int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); |