Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame^] | 1 | #if !defined(MBEDTLS_CONFIG_FILE) |
| 2 | #include "mbedtls/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 | f071024 | 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 | |
| 13 | typedef struct fuzzBufferOffset |
| 14 | { |
| 15 | const uint8_t *Data; |
| 16 | size_t Size; |
| 17 | size_t Offset; |
| 18 | } fuzzBufferOffset_t; |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 19 | |
Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame^] | 20 | #if defined(MBEDTLS_HAVE_TIME) |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 21 | mbedtls_time_t dummy_constant_time( mbedtls_time_t* time ); |
Daniel Axtens | f071024 | 2020-05-28 11:43:41 +1000 | [diff] [blame^] | 22 | #endif |
Philippe Antoine | 0863382 | 2019-06-04 14:03:06 +0200 | [diff] [blame] | 23 | void dummy_init(); |
Philippe Antoine | 499c735 | 2019-06-04 14:14:33 +0200 | [diff] [blame] | 24 | |
| 25 | int dummy_send( void *ctx, const unsigned char *buf, size_t len ); |
| 26 | int fuzz_recv( void *ctx, unsigned char *buf, size_t len ); |
| 27 | int dummy_random( void *p_rng, unsigned char *output, size_t output_len ); |
| 28 | int dummy_entropy( void *data, unsigned char *output, size_t len ); |
| 29 | int fuzz_recv_timeout( void *ctx, unsigned char *buf, size_t len, |
| 30 | uint32_t timeout ); |