aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/various/wolfssl_bindings/user_settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/various/wolfssl_bindings/user_settings.h')
-rw-r--r--lib/chibios/os/various/wolfssl_bindings/user_settings.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/lib/chibios/os/various/wolfssl_bindings/user_settings.h b/lib/chibios/os/various/wolfssl_bindings/user_settings.h
new file mode 100644
index 000000000..03be06b8e
--- /dev/null
+++ b/lib/chibios/os/various/wolfssl_bindings/user_settings.h
@@ -0,0 +1,86 @@
1#include <stdint.h>
2
3/* Configuration */
4
5#define WOLFSSL_GENERAL_ALIGNMENT 4
6#define HAVE_TM_TYPE
7#define WORD64_AVAILABLE
8
9
10/* ChibiOS + Lwip */
11#define HAVE_LWIP_NATIVE
12#define WOLFSSL_CHIBIOS
13
14#define USER_TICKS
15#define WOLFSSL_USER_CURRTIME
16#define XMALLOC_OVERRIDE
17//#define USE_WOLF_TIME_T
18#define XTIME(tl) (LowResTimer())
19
20
21/* ARM */
22
23#define RSA_LOW_MEM
24#define NO_OLD_RNGNAME
25#define SMALL_SESSION_CACHE
26#define WOLFSSL_SMALL_STACK
27
28#define TFM_ARM
29#define SINGLE_THREADED
30#define NO_SIG_WRAPPER
31
32/* Cipher features */
33//#define USE_FAST_MATH
34//#define ALT_ECC_SIZE
35
36#define HAVE_FFDHE_2048
37#define HAVE_CHACHA
38#define HAVE_POLY1305
39#define HAVE_ECC
40#define HAVE_CURVE25519
41#define CURVED25519_SMALL
42#define HAVE_ONE_TIME_AUTH
43#define WOLFSSL_DH_CONST
44
45/* HW RNG support */
46
47unsigned int chibios_rand_generate(void);
48int custom_rand_generate_block(unsigned char* output, unsigned int sz);
49
50#define CUSTOM_RAND_GENERATE chibios_rand_generate
51#define CUSTOM_RAND_TYPE uint32_t
52
53#define HAVE_ED25519
54#define HAVE_POLY1305
55#define HAVE_SHA512
56#define WOLFSSL_SHA512
57
58
59/* Size/speed config */
60#define USE_SLOW_SHA2
61#define USE_SLOW_SHA512
62
63/* Robustness */
64#define TFM_TIMING_RESISTANT
65#define ECC_TIMING_RESISTANT
66#define WC_RSA_BLINDING
67
68/* Remove Features */
69#define NO_WRITEV
70#define NO_DEV_RANDOM
71#define NO_FILESYSTEM
72#define NO_MAIN_DRIVER
73#define NO_MD4
74#define NO_RABBIT
75#define NO_HC128
76#define NO_DSA
77#define NO_PWDBASED
78#define NO_PSK
79#define NO_DES3
80#define NO_RC4
81
82
83/* Realloc (to use without USE_FAST_MATH) */
84
85void *chHeapRealloc (void *addr, uint32_t size);
86#define XREALLOC(p,n,h,t) chHeapRealloc( (p) , (n) )