1 /* Custom build settings for Android */
2 
3 #ifndef _WOLF_USER_SETTINGS_H_
4 #define _WOLF_USER_SETTINGS_H_
5 
6 #if 0
7     #define HAVE_FIPS_VERSION 2
8     #define HAVE_FIPS
9 #endif
10 
11 #ifdef __aarch64__
12     #if !defined(__clang__) || \
13         (defined(__clang__) && defined(__clang_major__) && __clang_major__ >= 5)
14         /* older clang v4 has issue with inline assembly contraints */
15         #define WOLFSSL_ARMASM
16     #endif
17 #endif
18 
19 #if 1 /* SP Assembly Speedups (wPAA) */
20     #define WOLFSSL_SP
21     #define WOLFSSL_SP_SMALL      /* use smaller version of code */
22     #define WOLFSSL_HAVE_SP_RSA
23     #define WOLFSSL_HAVE_SP_DH
24     #define WOLFSSL_HAVE_SP_ECC
25     #ifdef WOLFSSL_ARMASM
26         #define WOLFSSL_SP_ARM64_ASM
27     #endif
28 #endif
29 
30 /* WPA Supplicant Support */
31 #define WOLFSSL_WPAS_SMALL
32 #define OPENSSL_ALL
33 #define HAVE_THREAD_LS
34 
35 #define USE_FAST_MATH
36 #define FP_MAX_BITS (4096*2) /* Maximum math bits (Max RSA key bits * 2) */
37 #define TFM_TIMING_RESISTANT
38 #define ECC_TIMING_RESISTANT
39 #define WC_RSA_BLINDING
40 
41 #define HAVE_HASHDRBG
42 
43 #if 1
44     #define WOLFSSL_TLS13
45 #endif
46 #define WC_RSA_PSS
47 #define HAVE_SESSION_TICKET
48 #define HAVE_TLS_EXTENSIONS
49 #define HAVE_SUPPORTED_CURVES
50 #define HAVE_EXTENDED_MASTER
51 #define HAVE_ENCRYPT_THEN_MAC
52 #define WOLFSSL_ENCRYPTED_KEYS
53 #define HAVE_KEYING_MATERIAL
54 #define NO_OLD_TLS
55 #define NO_CHECK_PRIVATE_KEY
56 
57 /* enable PK callback support for signing operations to key store */
58 #define HAVE_PK_CALLBACKS
59 /* crypto callback support is not in FIPS 3389 */
60 #ifndef HAVE_FIPS
61     #define WOLF_CRYPTO_CB
62 #endif
63 
64 #define KEEP_OUR_CERT
65 #define KEEP_PEER_CERT
66 #define WOLFSSL_ALWAYS_VERIFY_CB
67 #define WOLFSSL_ALWAYS_KEEP_SNI
68 #define HAVE_EX_DATA
69 #define HAVE_EXT_CACHE
70 #define WOLFSSL_EITHER_SIDE
71 #define WOLFSSL_PUBLIC_MP
72 #define WOLFSSL_DER_LOAD
73 
74 #define WOLFSSL_CERT_GEN
75 #define WOLFSSL_CERT_EXT
76 #define WOLFSSL_CERT_REQ
77 
78 #define WOLFSSL_KEY_GEN
79 #define WC_RSA_NO_PADDING
80 
81 #define WOLFSSL_DH_CONST
82 #define HAVE_FFDHE_2048
83 #define HAVE_FFDHE_3072
84 #define HAVE_FFDHE_4096
85 #define HAVE_DH_DEFAULT_PARAMS
86 #ifdef HAVE_FIPS
87     #define WOLFSSL_VALIDATE_FFC_IMPORT
88     #define HAVE_FFDHE_Q
89 #endif
90 
91 #define WOLFSSL_SHA224
92 #define WOLFSSL_SHA512
93 #define WOLFSSL_SHA384
94 #define WOLFSSL_NOSHA512_256
95 #define WOLFSSL_NOSHA512_224
96 #define WOLFSSL_SHA3
97 
98 #define HAVE_HKDF
99 #define HAVE_PKCS8
100 
101 #define HAVE_ECC
102 #define TFM_ECC256
103 #define ECC_SHAMIR
104 #define HAVE_COMP_KEY
105 #ifdef HAVE_FIPS
106     #define HAVE_ECC_CDH
107     #define WOLFSSL_VALIDATE_ECC_IMPORT
108 #endif
109 #ifdef __i386
110     #define TFM_NO_ASM
111 #endif
112 
113 #define HAVE_AESGCM
114 #define HAVE_AESCCM
115 #define WOLFSSL_AES_DIRECT
116 #define WOLFSSL_AES_COUNTER
117 #define HAVE_AES_ECB
118 #define WOLFSSL_CMAC
119 
120 #define WOLFSSL_BASE64_ENCODE
121 #define HAVE_CRL
122 
123 #define NO_DSA
124 #define NO_RC4
125 #define NO_HC128
126 #define NO_RABBIT
127 #define NO_RC4
128 #define NO_PSK
129 #define WOLFSSL_NO_SHAKE256
130 #define NO_MD4
131 #define NO_OLD_MD5_NAME
132 #define NO_OLD_SHA_NAMES
133 #define NO_OLD_SHA256_NAMES
134 #define NO_OLD_WC_NAMES
135 
136 #if 0
137     #define DEBUG_WOLFSSL
138     #define WOLFSSL_ANDROID_DEBUG
139 #endif
140 
141 #endif /* _WOLF_USER_SETTINGS_H_ */
142