Daniel Axtens | 301db66 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 1 | #if !defined(MBEDTLS_CONFIG_FILE) |
| 2 | #include "mbedtls/config.h" |
| 3 | #else |
| 4 | #include MBEDTLS_CONFIG_FILE |
| 5 | #endif |
| 6 | |
| 7 | #if defined(MBEDTLS_HAVE_TIME) |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 8 | #include "mbedtls/platform_time.h" |
Daniel Axtens | 301db66 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 9 | #endif |
| 10 | #include <stddef.h> |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 11 | #include <stdint.h> |
| 12 | |
Gilles Peskine | 1b6c09a | 2023-01-11 14:52:35 +0100 | [diff] [blame] | 13 | typedef struct fuzzBufferOffset { |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 14 | const uint8_t *Data; |
| 15 | size_t Size; |
| 16 | size_t Offset; |
| 17 | } fuzzBufferOffset_t; |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 18 | |
Daniel Axtens | 301db66 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 19 | #if defined(MBEDTLS_HAVE_TIME) |
Gilles Peskine | 1b6c09a | 2023-01-11 14:52:35 +0100 | [diff] [blame] | 20 | mbedtls_time_t dummy_constant_time(mbedtls_time_t *time); |
Daniel Axtens | 301db66 | 2020-05-28 11:43:41 +1000 | [diff] [blame] | 21 | #endif |
Gowtham Suresh Kumar | 34d8bd3 | 2023-07-26 17:18:55 +0100 | [diff] [blame] | 22 | void dummy_init(void); |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 23 | |
Gilles Peskine | 1b6c09a | 2023-01-11 14:52:35 +0100 | [diff] [blame] | 24 | int dummy_send(void *ctx, const unsigned char *buf, size_t len); |
| 25 | int fuzz_recv(void *ctx, unsigned char *buf, size_t len); |
| 26 | int dummy_random(void *p_rng, unsigned char *output, size_t output_len); |
| 27 | int dummy_entropy(void *data, unsigned char *output, size_t len); |
| 28 | int fuzz_recv_timeout(void *ctx, unsigned char *buf, size_t len, |
| 29 | uint32_t timeout); |