user_settings_all.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. /* user_settings_all.h
  2. *
  3. * Copyright (C) 2006-2024 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_CERT_CHAINS /* 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. #define WOLFSSL_ALT_NAMES /* Support subject alternative names extension */
  117. /* Certificate Revocation */
  118. #define HAVE_OCSP
  119. #define HAVE_CERTIFICATE_STATUS_REQUEST
  120. #define HAVE_CERTIFICATE_STATUS_REQUEST_V2
  121. #define HAVE_CRL
  122. #define HAVE_CRL_IO
  123. #define HAVE_IO_TIMEOUT
  124. //#define HAVE_CRL_MONITOR /* DG Disabled (Monitors CRL files on filesystem) - not portable feature */
  125. #if 1
  126. /* sp_int.c */
  127. #define WOLFSSL_SP_MATH_ALL
  128. #else
  129. /* Fast math key size 4096-bit max */
  130. #define USE_FAST_MATH
  131. #endif
  132. //#define HAVE___UINT128_T 1 /* DG commented: May not be portable */
  133. /* Max Sizes */
  134. #define RSA_MAX_SIZE 4096
  135. #define FP_MAX_BITS 8192
  136. #define SP_INT_BITS 4096
  137. /* Timing Resistance */
  138. #define TFM_TIMING_RESISTANT
  139. #define ECC_TIMING_RESISTANT
  140. #define WC_RSA_BLINDING
  141. /* DH Key Sizes */
  142. #define HAVE_FFDHE_2048
  143. #define HAVE_FFDHE_3072
  144. #define WOLFSSL_DH_EXTRA /* Enable additional DH key import/export */
  145. #define HAVE_DH_DEFAULT_PARAMS
  146. /* ECC Features */
  147. #define HAVE_ECC
  148. #define TFM_ECC256
  149. #define ECC_SHAMIR
  150. #define WOLFSSL_CUSTOM_CURVES /* enable other curves (not just prime) */
  151. #define HAVE_ECC_SECPR2
  152. #define HAVE_ECC_SECPR3
  153. #define HAVE_ECC_BRAINPOOL
  154. #define HAVE_ECC_KOBLITZ
  155. #define HAVE_ECC_CDH /* Co-factor */
  156. #define HAVE_COMP_KEY /* Compressed key support */
  157. #define FP_ECC /* Fixed point caching - speed repeated operations against same key */
  158. #define HAVE_ECC_ENCRYPT
  159. #define WOLFCRYPT_HAVE_ECCSI
  160. #define WOLFCRYPT_HAVE_SAKKE
  161. #define WOLFSSL_ECDSA_DETERMINISTIC_K_VARIANT
  162. /* RSA */
  163. #define WC_RSA_PSS
  164. #define WOLFSSL_PSS_LONG_SALT
  165. #define WC_RSA_NO_PADDING
  166. /* AES */
  167. #define HAVE_AES_DECRYPT
  168. #define HAVE_AES_ECB
  169. #define WOLFSSL_AES_DIRECT
  170. #define WOLFSSL_AES_COUNTER
  171. #define HAVE_AESGCM
  172. #define GCM_TABLE_4BIT
  173. #define WOLFSSL_AESGCM_STREAM
  174. #define HAVE_AESCCM
  175. #define WOLFSSL_AES_OFB
  176. #define WOLFSSL_AES_CFB
  177. #define WOLFSSL_AES_XTS
  178. #define HAVE_AES_KEYWRAP
  179. #define WOLFSSL_AES_CBC_LENGTH_CHECKS
  180. #define WOLFSSL_USE_ALIGN
  181. #define WOLFSSL_AES_SIV
  182. /* Hashing */
  183. #define WOLFSSL_SHA224
  184. #define WOLFSSL_SHA512
  185. #define WOLFSSL_SHA384
  186. #define WOLFSSL_SHAKE256
  187. #define WOLFSSL_SHA3
  188. #define WOLFSSL_HASH_FLAGS /* enable hash flag API's */
  189. #define WOLFSSL_SHAKE256
  190. /* Additional Algorithms */
  191. #define HAVE_HASHDRBG
  192. #define HAVE_CURVE25519
  193. #define HAVE_ED25519
  194. #define WOLFSSL_ED25519_STREAMING_VERIFY
  195. #define CURVED25519_SMALL
  196. #define HAVE_ED448
  197. #define WOLFSSL_ED448_STREAMING_VERIFY
  198. #define HAVE_CURVE448
  199. #define HAVE_POLY1305
  200. #define HAVE_CHACHA
  201. #define HAVE_XCHACHA
  202. #define HAVE_HKDF
  203. #define HAVE_X963_KDF
  204. #define WOLFSSL_CMAC
  205. #define WOLFSSL_DES_ECB
  206. #define HAVE_BLAKE2
  207. #define HAVE_BLAKE2B
  208. #define HAVE_BLAKE2S
  209. #define WOLFSSL_SIPHASH
  210. #define HAVE_KEYING_MATERIAL
  211. #define WOLFSSL_HAVE_PRF
  212. /* Encrypted Client Hello */
  213. #define HAVE_HPKE
  214. #define HAVE_ECH
  215. /* Non-Standard Algorithms (DG disabled) */
  216. //#define HAVE_CAMELLIA
  217. //#define WOLFSSL_RIPEMD
  218. //#define HAVE_SCRYPT
  219. //#define WOLFSSL_MD2
  220. //#define WOLFSSL_ALLOW_RC4
  221. /* Encoding */
  222. #define WOLFSSL_BASE16
  223. #define WOLFSSL_BASE64_ENCODE
  224. /* Openssl compatibility */
  225. #if 0 /* DG Disabled */
  226. /* Openssl compatibility API's */
  227. #define OPENSSL_EXTRA
  228. #define OPENSSL_ALL
  229. #define HAVE_OPENSSL_CMD
  230. #define SSL_TXT_TLSV1_2
  231. #define SSL_TXT_TLSV1_1
  232. #define OPENSSL_NO_SSL2
  233. #define OPENSSL_NO_SSL3
  234. #define NO_OLD_RNGNAME
  235. #define NO_OLD_WC_NAMES
  236. #define NO_OLD_SSL_NAMES
  237. #define NO_OLD_SHA_NAMES
  238. #define NO_OLD_MD5_NAME
  239. #define OPENSSL_NO_EC /* macro to enable ECC in openssl */
  240. #define WOLFSSL_VERBOSE_ERRORS
  241. #define ERROR_QUEUE_PER_THREAD
  242. #define WOLFSSL_ERROR_CODE_OPENSSL
  243. #define HAVE_WOLFSSL_SSL_H 1
  244. #define OPENSSL_COMPATIBLE_DEFAULTS
  245. /* Openssl compatibility application specific */
  246. #define WOLFSSL_LIBWEBSOCKETS
  247. #define WOLFSSL_OPENSSH
  248. #define WOLFSSL_QT
  249. #define FORTRESS
  250. #define HAVE_WEBSERVER
  251. #define HAVE_LIGHTY
  252. #define WOLFSSL_NGINX
  253. #define WOLFSSL_HAPROXY
  254. #define HAVE_STUNNEL
  255. #define WOLFSSL_ASIO
  256. #define ASIO_USE_WOLFSSL
  257. #define BOOST_ASIO_USE_WOLFSSL
  258. #define WOLFSSL_OPENVPN
  259. #define NO_WOLFSSL_STUB
  260. #endif
  261. /* TLS static cipher support - off by default */
  262. #if 0
  263. #define WOLFSSL_STATIC_RSA
  264. #define WOLFSSL_STATIC_DH
  265. #define WOLFSSL_STATIC_PSK
  266. #endif
  267. /* TLS sniffer support - off by default */
  268. #if 0
  269. #define WOLFSSL_STATIC_EPHEMERAL
  270. #define WOLFSSL_SNIFFER
  271. #endif
  272. /* Used to manually test disable edge cases */
  273. #ifdef TEST_DISABLES
  274. #define NO_SESSION_CACHE
  275. //#define NO_ECC256
  276. //#define NO_ECC_KEY_EXPORT
  277. //#define NO_ECC_DHE
  278. //#define NO_ECC_SIGN
  279. //#define NO_ECC_VERIFY
  280. //#define NO_RSA
  281. #define NO_DH
  282. #define NO_DSA
  283. #define NO_SHA
  284. #define NO_SHA256
  285. #ifdef NO_SHA256
  286. #undef WOLFSSL_SHA224
  287. #endif
  288. #define NO_SHA512
  289. #ifdef NO_SHA512
  290. #undef WOLFSSL_SHA384
  291. #undef WOLFSSL_SHA512
  292. #undef HAVE_ED25519
  293. #endif
  294. #define NO_MD4
  295. #define NO_MD5
  296. //#define NO_KDF
  297. //#define NO_HMAC
  298. #define NO_RC4
  299. #define NO_DES3
  300. //#define NO_AES
  301. #define NO_AES_CBC
  302. #define WOLFSSL_NO_SHAKE128
  303. #define NO_PSK
  304. #define NO_PWDBASED
  305. #define NO_OLD_TLS
  306. //#define WOLFSSL_NO_TLS12
  307. //#define NO_64BIT
  308. #define WOLFSSL_SP_NO_MALLOC
  309. #define NO_FILESYSTEM
  310. #define NO_WRITEV
  311. #define NO_ERROR_STRINGS
  312. //#define NO_WOLFSSL_CLIENT
  313. //#define NO_WOLFSSL_SERVER
  314. #define NO_MULTIBYTE_PRINT
  315. //#define NO_ASN_TIME
  316. //#define NO_ASN_CRYPT
  317. //#define NO_CODING
  318. #define NO_SIG_WRAPPER
  319. //#define NO_HASH_WRAPPER
  320. //#define WC_NO_HARDEN
  321. //#define NO_CERTS
  322. //#define NO_ASN
  323. #endif
  324. #ifdef __cplusplus
  325. }
  326. #endif
  327. #endif /* WOLFSSL_USER_SETTINGS_H */