1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2018 Intel Corporation 4 * All rights reserved. 5 */ 6 7 #ifndef TCTI_FUZZING_H 8 #define TCTI_FUZZING_H 9 10 #include <limits.h> 11 12 #include "tss2-tcti/tcti-common.h" 13 #include "util/io.h" 14 #include "tss2-sys/sysapi_util.h" 15 16 #define TCTI_FUZZING_MAGIC 0x66757a7a696e6700ULL 17 18 typedef struct { 19 TSS2_TCTI_COMMON_CONTEXT common; 20 const uint8_t *data; 21 size_t size; 22 } TSS2_TCTI_FUZZING_CONTEXT; 23 24 TSS2_TCTI_FUZZING_CONTEXT* 25 tcti_fuzzing_context_cast (TSS2_TCTI_CONTEXT *tcti_ctx); 26 27 int 28 fuzz_fill ( 29 TSS2_SYS_CONTEXT *sysContext, 30 size_t count, 31 ...); 32 33 #endif /* TCTI_FUZZING_H */ 34