user_settings_all.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. /* user_settings_all.h
  2. *
  3. * Copyright (C) 2006-2023 wolfSSL Inc.
  4. *
  5. * This file is part of wolfSSL.
  6. *
  7. * wolfSSL is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * wolfSSL is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. */
  21. /* should be renamed to user_settings.h for customer use
  22. * generated from configure options ./configure --enable-all
  23. *
  24. * Cleaned up by David Garske
  25. */
  26. #ifndef WOLFSSL_USER_SETTINGS_H
  27. #define WOLFSSL_USER_SETTINGS_H
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. /* Features */
  32. #define WOLFSSL_PUBLIC_MP /* Make math API's public */
  33. #define KEEP_PEER_CERT /* Retain peer's certificate */
  34. #define KEEP_OUR_CERT /* Keep our certificate */
  35. #define WOLFSSL_ALWAYS_VERIFY_CB /* Always call verify callback (configured via wolfSSL_CTX_set_verify API) */
  36. #define WOLFSSL_VERIFY_CB_ALL_CERTS /* Call verify callback for all intermediate certs */
  37. #define WOLFSSL_ALWAYS_KEEP_SNI
  38. #define WOLFSSL_EXTRA_ALERTS /* Allow sending other TLS alerts */
  39. #define HAVE_EX_DATA /* Enable "extra" EX data API's for user information in CTX/WOLFSSL */
  40. #define HAVE_EXT_CACHE
  41. #define ATOMIC_USER /* Enable Atomic Record Layer callbacks */
  42. #define HAVE_PK_CALLBACKS /* Enable public key callbacks */
  43. #define WOLFSSL_ALT_NAMES /* Allow alternate cert chain validation to any trusted cert (not entire chain presented by peer) */
  44. #define HAVE_NULL_CIPHER /* Enable use of TLS cipher suites without cipher (clear text / no encryption) */
  45. #define WOLFSSL_HAVE_CERT_SERVICE
  46. #define WOLFSSL_JNI
  47. #define WOLFSSL_SEP /* certificate policy set extension */
  48. #define WOLFCRYPT_HAVE_SRP
  49. #define WOLFSSL_HAVE_WOLFSCEP
  50. #define WOLFSSL_ENCRYPTED_KEYS /* Support for encrypted keys PKCS8 */
  51. #define HAVE_PKCS7
  52. #define WOLFSSL_SIGNER_DER_CERT
  53. #define WOLFSSL_TRUST_PEER_CERT
  54. #define WOLFSSL_SYS_CA_CERTS /* Enable ability to load CA certs from OS */
  55. #define WOLFSSL_WOLFSSH
  56. #define WC_NO_ASYNC_THREADING
  57. //#define HAVE_THREAD_LS /* DG Commented: Thread local storage - may not be portable */
  58. //#define WOLFSSL_AEAD_ONLY /* automatically set if TLS v1.3 only, but can be enabled for TLS v1.2 manually */
  59. /* TLS Features */
  60. #define WOLFSSL_TLS13
  61. #define WOLFSSL_EITHER_SIDE /* allow generic server/client method for WOLFSSL_CTX new */
  62. #define WOLFSSL_TLS13_NO_PEEK_HANDSHAKE_DONE
  63. /* DTLS */
  64. #define WOLFSSL_DTLS
  65. #define WOLFSSL_MULTICAST
  66. /* DTLS v1.3 is not yet included with enable-all */
  67. //#define WOLFSSL_DTLS13
  68. /* DG Disabled SSLv3 and TLSv1.0 - should avoid using */
  69. //#define WOLFSSL_ALLOW_SSLV3
  70. //#define WOLFSSL_ALLOW_TLSV10
  71. /* TLS Extensions */
  72. #define HAVE_TLS_EXTENSIONS
  73. #define HAVE_SUPPORTED_CURVES
  74. #define HAVE_ONE_TIME_AUTH
  75. #define HAVE_SNI
  76. #define HAVE_ALPN
  77. #define HAVE_MAX_FRAGMENT
  78. #define HAVE_TRUNCATED_HMAC
  79. #define HAVE_SESSION_TICKET
  80. #define WOLFSSL_TICKET_HAVE_ID
  81. #define WOLFSSL_FORCE_CACHE_ON_TICKET
  82. #define HAVE_EXTENDED_MASTER
  83. #define HAVE_TRUSTED_CA
  84. #define HAVE_ENCRYPT_THEN_MAC
  85. #define WOLFSSL_POST_HANDSHAKE_AUTH
  86. #define WOLFSSL_SEND_HRR_COOKIE /* Used by DTLS v1.3 */
  87. #define HAVE_ANON /* anon cipher suites */
  88. #define HAVE_FALLBACK_SCSV /* TLS_FALLBACK_SCSV */
  89. #define WOLFSSL_EARLY_DATA
  90. #define HAVE_SERVER_RENEGOTIATION_INFO
  91. /* TLS Session Cache */
  92. #define SESSION_CERTS
  93. #define PERSIST_SESSION_CACHE
  94. #define PERSIST_CERT_CACHE
  95. /* Key and Certificate Generation */
  96. #define WOLFSSL_KEY_GEN
  97. #define WOLFSSL_CERT_GEN
  98. #define WOLFSSL_CERT_REQ
  99. #define WOLFSSL_CERT_EXT
  100. #define WOLFSSL_MULTI_ATTRIB
  101. #define HAVE_SMIME
  102. #define WOLFSSL_DER_LOAD
  103. #define ASN_BER_TO_DER /* BER to DER support */
  104. #define WOLFSSL_HAVE_ISSUER_NAMES /* Store pointers to issuer name components and their lengths and encodings */
  105. #define WOLFSSL_SUBJ_DIR_ATTR /* Enable support for SubjectDirectoryAttributes extension */
  106. #define WOLFSSL_SUBJ_INFO_ACC /* Enable support for SubjectInfoAccess extension */
  107. #define WOLFSSL_CERT_NAME_ALL /* Adds more certificate name capability at the cost of taking up more memory. Adds initials, givenname, dnQualifer for example */
  108. #define WOLFSSL_FPKI /* Enable support for FPKI (Federal PKI) extensions */
  109. #define WOLFSSL_AKID_NAME /* Enable support for full AuthorityKeyIdentifier extension. Only supports copying full AKID from an existing certificate */
  110. #define HAVE_CTS /* Ciphertext stealing interface */
  111. #define WOLFSSL_PEM_TO_DER
  112. #define WOLFSSL_DER_TO_PEM
  113. #define WOLFSSL_CUSTOM_OID
  114. #define HAVE_OID_ENCODING
  115. #define WOLFSSL_ASN_TEMPLATE
  116. /* Certificate Revocation */
  117. #define HAVE_OCSP
  118. #define HAVE_CERTIFICATE_STATUS_REQUEST
  119. #define HAVE_CERTIFICATE_STATUS_REQUEST_V2
  120. #define HAVE_CRL
  121. #define HAVE_CRL_IO
  122. #define HAVE_IO_TIMEOUT
  123. //#define HAVE_CRL_MONITOR /* DG Disabled (Monitors CRL files on filesystem) - not portable feature */
  124. #if 1
  125. /* sp_int.c */
  126. #define WOLFSSL_SP_MATH_ALL
  127. #else
  128. /* Fast math key size 4096-bit max */
  129. #define USE_FAST_MATH
  130. #endif
  131. //#define HAVE___UINT128_T 1 /* DG commented: May not be portable */
  132. /* Max Sizes */
  133. #define RSA_MAX_SIZE 4096
  134. #define FP_MAX_BITS 8192
  135. #define SP_INT_BITS 4096
  136. /* Timing Resistance */
  137. #define TFM_TIMING_RESISTANT
  138. #define ECC_TIMING_RESISTANT
  139. #define WC_RSA_BLINDING
  140. /* DH Key Sizes */
  141. #define HAVE_FFDHE_2048
  142. #define HAVE_FFDHE_3072
  143. #define WOLFSSL_DH_EXTRA /* Enable additional DH key import/export */
  144. #define HAVE_DH_DEFAULT_PARAMS
  145. /* ECC Features */
  146. #define HAVE_ECC
  147. #define TFM_ECC256
  148. #define ECC_SHAMIR
  149. #define WOLFSSL_CUSTOM_CURVES /* enable other curves (not just prime) */
  150. #define HAVE_ECC_SECPR2
  151. #define HAVE_ECC_SECPR3
  152. #define HAVE_ECC_BRAINPOOL
  153. #define HAVE_ECC_KOBLITZ
  154. #define HAVE_ECC_CDH /* Co-factor */
  155. #define HAVE_COMP_KEY /* Compressed key support */
  156. #define FP_ECC /* Fixed point caching - speed repeated operations against same key */
  157. #define HAVE_ECC_ENCRYPT
  158. #define WOLFCRYPT_HAVE_ECCSI
  159. #define WOLFCRYPT_HAVE_SAKKE
  160. #define WOLFSSL_ECDSA_DETERMINISTIC_K_VARIANT
  161. /* RSA */
  162. #define WC_RSA_PSS
  163. #define WOLFSSL_PSS_LONG_SALT
  164. #define WC_RSA_NO_PADDING
  165. /* AES */
  166. #define HAVE_AES_DECRYPT
  167. #define HAVE_AES_ECB
  168. #define WOLFSSL_AES_DIRECT
  169. #define WOLFSSL_AES_COUNTER
  170. #define HAVE_AESGCM
  171. #define GCM_TABLE_4BIT
  172. #define WOLFSSL_AESGCM_STREAM
  173. #define HAVE_AESCCM
  174. #define WOLFSSL_AES_OFB
  175. #define WOLFSSL_AES_CFB
  176. #define WOLFSSL_AES_XTS
  177. #define HAVE_AES_KEYWRAP
  178. #define WOLFSSL_AES_CBC_LENGTH_CHECKS
  179. #define WOLFSSL_USE_ALIGN
  180. #define WOLFSSL_AES_SIV
  181. /* Hashing */
  182. #define WOLFSSL_SHA224
  183. #define WOLFSSL_SHA512
  184. #define WOLFSSL_SHA384
  185. #define WOLFSSL_SHAKE256
  186. #define WOLFSSL_SHA3
  187. #define WOLFSSL_HASH_FLAGS /* enable hash flag API's */
  188. #define WOLFSSL_SHAKE256
  189. /* Additional Algorithms */
  190. #define HAVE_HASHDRBG
  191. #define HAVE_CURVE25519
  192. #define HAVE_ED25519
  193. #define WOLFSSL_ED25519_STREAMING_VERIFY
  194. #define CURVED25519_SMALL
  195. #define HAVE_ED448
  196. #define WOLFSSL_ED448_STREAMING_VERIFY
  197. #define HAVE_CURVE448
  198. #define HAVE_POLY1305
  199. #define HAVE_CHACHA
  200. #define HAVE_XCHACHA
  201. #define HAVE_HKDF
  202. #define HAVE_X963_KDF
  203. #define WOLFSSL_CMAC
  204. #define WOLFSSL_DES_ECB
  205. #define HAVE_BLAKE2
  206. #define HAVE_BLAKE2B
  207. #define HAVE_BLAKE2S
  208. #define WOLFSSL_SIPHASH
  209. #define HAVE_KEYING_MATERIAL
  210. #define WOLFSSL_HAVE_PRF
  211. /* Encrypted Client Hello */
  212. #define HAVE_HPKE
  213. #define HAVE_ECH
  214. /* Non-Standard Algorithms (DG disabled) */
  215. //#define HAVE_CAMELLIA
  216. //#define WOLFSSL_RIPEMD
  217. //#define HAVE_SCRYPT
  218. //#define WOLFSSL_MD2
  219. //#define WOLFSSL_ALLOW_RC4
  220. /* Encoding */
  221. #define WOLFSSL_BASE16
  222. #define WOLFSSL_BASE64_ENCODE
  223. /* Openssl compatibility */
  224. #if 0 /* DG Disabled */
  225. /* Openssl compatibility API's */
  226. #define OPENSSL_EXTRA
  227. #define OPENSSL_ALL
  228. #define HAVE_OPENSSL_CMD
  229. #define SSL_TXT_TLSV1_2
  230. #define SSL_TXT_TLSV1_1
  231. #define OPENSSL_NO_SSL2
  232. #define OPENSSL_NO_SSL3
  233. #define NO_OLD_RNGNAME
  234. #define NO_OLD_WC_NAMES
  235. #define NO_OLD_SSL_NAMES
  236. #define NO_OLD_SHA_NAMES
  237. #define NO_OLD_MD5_NAME
  238. #define OPENSSL_NO_EC /* macro to enable ECC in openssl */
  239. #define WOLFSSL_VERBOSE_ERRORS
  240. #define ERROR_QUEUE_PER_THREAD
  241. #define WOLFSSL_ERROR_CODE_OPENSSL
  242. #define HAVE_WOLFSSL_SSL_H 1
  243. #define OPENSSL_COMPATIBLE_DEFAULTS
  244. /* Openssl compatibility application specific */
  245. #define WOLFSSL_LIBWEBSOCKETS
  246. #define WOLFSSL_OPENSSH
  247. #define WOLFSSL_QT
  248. #define FORTRESS
  249. #define HAVE_WEBSERVER
  250. #define HAVE_LIGHTY
  251. #define WOLFSSL_NGINX
  252. #define WOLFSSL_HAPROXY
  253. #define HAVE_STUNNEL
  254. #define WOLFSSL_ASIO
  255. #define ASIO_USE_WOLFSSL
  256. #define BOOST_ASIO_USE_WOLFSSL
  257. #define WOLFSSL_OPENVPN
  258. #define NO_WOLFSSL_STUB
  259. #endif
  260. /* TLS static cipher support - off by default */
  261. #if 0
  262. #define WOLFSSL_STATIC_RSA
  263. #define WOLFSSL_STATIC_DH
  264. #define WOLFSSL_STATIC_PSK
  265. #endif
  266. /* TLS sniffer support - off by default */
  267. #if 0
  268. #define WOLFSSL_STATIC_EPHEMERAL
  269. #define WOLFSSL_SNIFFER
  270. #endif
  271. /* Used to manually test disable edge cases */
  272. #ifdef TEST_DISABLES
  273. #define NO_SESSION_CACHE
  274. //#define NO_ECC256
  275. //#define NO_ECC_KEY_EXPORT
  276. //#define NO_ECC_DHE
  277. //#define NO_ECC_SIGN
  278. //#define NO_ECC_VERIFY
  279. //#define NO_RSA
  280. #define NO_DH
  281. #define NO_DSA
  282. #define NO_SHA
  283. #define NO_SHA256
  284. #ifdef NO_SHA256
  285. #undef WOLFSSL_SHA224
  286. #endif
  287. #define NO_SHA512
  288. #ifdef NO_SHA512
  289. #undef WOLFSSL_SHA384
  290. #undef WOLFSSL_SHA512
  291. #undef HAVE_ED25519
  292. #endif
  293. #define NO_MD4
  294. #define NO_MD5
  295. //#define NO_KDF
  296. //#define NO_HMAC
  297. #define NO_RC4
  298. #define NO_DES3
  299. //#define NO_AES
  300. #define NO_AES_CBC
  301. #define WOLFSSL_NO_SHAKE128
  302. #define NO_PSK
  303. #define NO_PWDBASED
  304. #define NO_OLD_TLS
  305. //#define WOLFSSL_NO_TLS12
  306. //#define NO_64BIT
  307. #define WOLFSSL_SP_NO_MALLOC
  308. #define NO_FILESYSTEM
  309. #define NO_WRITEV
  310. #define NO_ERROR_STRINGS
  311. //#define NO_WOLFSSL_CLIENT
  312. //#define NO_WOLFSSL_SERVER
  313. #define NO_MULTIBYTE_PRINT
  314. //#define NO_ASN_TIME
  315. //#define NO_ASN_CRYPT
  316. //#define NO_CODING
  317. #define NO_SIG_WRAPPER
  318. //#define NO_HASH_WRAPPER
  319. //#define WC_NO_HARDEN
  320. //#define NO_CERTS
  321. //#define NO_ASN
  322. #endif
  323. #ifdef __cplusplus
  324. }
  325. #endif
  326. #endif /* WOLFSSL_USER_SETTINGS_H */