user_settings.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. /* user_settings.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. /* Custom wolfSSL user settings for GCC ARM */
  22. #ifndef WOLFSSL_USER_SETTINGS_H
  23. #define WOLFSSL_USER_SETTINGS_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* ------------------------------------------------------------------------- */
  28. /* Platform */
  29. /* ------------------------------------------------------------------------- */
  30. #undef WOLFSSL_GENERAL_ALIGNMENT
  31. #define WOLFSSL_GENERAL_ALIGNMENT 4
  32. /* Multi-threaded support */
  33. #undef SINGLE_THREADED
  34. #if 0
  35. #define SINGLE_THREADED
  36. #else
  37. #define ERROR_QUEUE_PER_THREAD /* if applicable otherwise comment out */
  38. #endif
  39. #ifdef SINGLE_THREADED
  40. #undef NO_THREAD_LS
  41. #define NO_THREAD_LS
  42. #endif
  43. #undef WOLFSSL_USER_IO
  44. //#define WOLFSSL_USER_IO
  45. #undef NO_WRITE_TEMP_FILES
  46. #define NO_WRITE_TEMP_FILES
  47. /* FIPS 140-3 OE specific section(s) */
  48. /* Uncomment for Android devices */
  49. #undef ANDROID_V454
  50. /* #define ANDROID_V454 */
  51. #ifdef ANDROID_V454
  52. #if 1
  53. /* To have all printouts go to the app view on the device use: */
  54. extern int appendToTextView(const char* fmt, ...);
  55. #undef printf
  56. #define printf(format, ...) appendToTextView(format, ## __VA_ARGS__)
  57. #else
  58. #include <android/log.h>
  59. #define WOLFLOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, "wolfCrypt_android", __VA_ARGS__)
  60. #undef printf
  61. #define printf WOLFLOGV
  62. #endif
  63. #endif
  64. /* Uncomment for WINCE 6.0 devices. NOTE: _WIN32_WCE defined by system */
  65. #if 1
  66. #define NO_WOLFSSL_DIR
  67. #define WOLFSSL_NO_ATOMICS
  68. #define WC_NO_ASYNC_THREADING
  69. #define USE_WINDOWS_API
  70. #define WOLFSSL_SMALL_STACK
  71. #define MAX_SUPPORTED_THREADS 1024
  72. #define MAX_SUPPORTED_PRIV_KEYS 1024
  73. #define MAX_CONFIGURED_THREAD 512
  74. #endif
  75. /* ------------------------------------------------------------------------- */
  76. /* Math Configuration */
  77. /* ------------------------------------------------------------------------- */
  78. #undef SIZEOF_LONG_LONG
  79. #define SIZEOF_LONG_LONG 8
  80. #undef USE_FAST_MATH
  81. #if 1
  82. #define USE_FAST_MATH
  83. #undef TFM_TIMING_RESISTANT
  84. #define TFM_TIMING_RESISTANT
  85. #undef TFM_NO_ASM
  86. #define TFM_NO_ASM
  87. /* Optimizations */
  88. //#define TFM_ARM
  89. /* Maximum math bits (Max RSA key bits * 2) */
  90. #undef FP_MAX_BITS
  91. #define FP_MAX_BITS 16384
  92. #else
  93. #define WOLFSSL_SP_MATH_ALL
  94. #define WOLFSSL_SP_INT_NEGATIVE
  95. /* Maximum math bits (largest supported key bits) */
  96. #undef SP_INT_BITS
  97. #define SP_INT_BITS 8192
  98. #endif
  99. /* Wolf Single Precision Math */
  100. #undef WOLFSSL_SP
  101. #if 0 /* SP Assembly Speedups (wPAA) */
  102. //#define WOLFSSL_SP
  103. //#define WOLFSSL_SP_SMALL /* use smaller version of code */
  104. //#define WOLFSSL_SP_1024
  105. //#define WOLFCRYPT_HAVE_SAKKE /* Note: Sakke can be enabled with 1024-bit support */
  106. //#define WOLFSSL_SP_4096 /* Explicitly enable 4096-bit support (2048/3072 on by default) */
  107. //#define WOLFSSL_SP_384 /* Explicitly enable 384-bit support (others on by default) */
  108. //#define WOLFSSL_SP_521 /* Explicitly enable 521-bit support (others on by default) */
  109. //#define WOLFSSL_HAVE_SP_RSA
  110. //#define WOLFSSL_HAVE_SP_DH
  111. //#define WOLFSSL_HAVE_SP_ECC
  112. /* If no PAA, leave out */
  113. //#define WOLFSSL_ARMASM
  114. //#define WOLFSSL_SP_ARM64_ASM
  115. #endif
  116. /* ------------------------------------------------------------------------- */
  117. /* FIPS - Requires eval or license from wolfSSL */
  118. /* ------------------------------------------------------------------------- */
  119. #undef HAVE_FIPS
  120. #if 1
  121. #define WOLFCRYPT_FIPS_CORE_HASH_VALUE C82E8BD05125ED82DE72A521EEB369E026526D089ADCB6FB2B943479A9D5DB63
  122. #define HAVE_FIPS
  123. #undef HAVE_FIPS_VERSION
  124. #define HAVE_FIPS_VERSION 5
  125. #undef HAVE_FIPS_VERSION_MINOR
  126. #define HAVE_FIPS_VERSION_MINOR 2
  127. #undef WOLFSSL_WOLFSSH
  128. #define WOLFSSL_WOLFSSH
  129. #undef WC_RNG_SEED_CB
  130. #define WC_RNG_SEED_CB
  131. #if 0
  132. #undef NO_ATTRIBUTE_CONSTRUCTOR
  133. #define NO_ATTRIBUTE_CONSTRUCTOR
  134. #endif
  135. #endif
  136. /* ------------------------------------------------------------------------- */
  137. /* Crypto */
  138. /* ------------------------------------------------------------------------- */
  139. /* RSA */
  140. #undef NO_RSA
  141. #if 1
  142. /* half as much memory but twice as slow */
  143. #undef RSA_LOW_MEM
  144. //#define RSA_LOW_MEM
  145. /* Enables blinding mode, to prevent timing attacks */
  146. #if 1
  147. #undef WC_RSA_BLINDING
  148. #define WC_RSA_BLINDING
  149. #else
  150. #undef WC_NO_HARDEN
  151. #define WC_NO_HARDEN
  152. #endif
  153. /* RSA PSS Support */
  154. #if 1
  155. #undef WC_RSA_PSS
  156. #define WC_RSA_PSS
  157. #undef WOLFSSL_PSS_LONG_SALT
  158. #define WOLFSSL_PSS_LONG_SALT
  159. #undef WOLFSSL_PSS_SALT_LEN_DISCOVER
  160. #define WOLFSSL_PSS_SALT_LEN_DISCOVER
  161. #endif
  162. #if 1
  163. #define WC_RSA_NO_PADDING
  164. #endif
  165. #else
  166. #define NO_RSA
  167. #endif
  168. /* ECC */
  169. #undef HAVE_ECC
  170. #if 1
  171. #define HAVE_ECC
  172. /* Manually define enabled curves */
  173. #undef ECC_USER_CURVES
  174. //#define ECC_USER_CURVES
  175. #ifdef ECC_USER_CURVES
  176. /* Manual Curve Selection */
  177. #define HAVE_ECC192
  178. #define HAVE_ECC224
  179. #undef NO_ECC256
  180. #define HAVE_ECC256
  181. #define HAVE_ECC384
  182. #define HAVE_ECC521
  183. #endif
  184. /* Fixed point cache (speeds repeated operations against same private key) */
  185. #undef FP_ECC
  186. //#define FP_ECC
  187. #ifdef FP_ECC
  188. /* Bits / Entries */
  189. #undef FP_ENTRIES
  190. #define FP_ENTRIES 2
  191. #undef FP_LUT
  192. #define FP_LUT 4
  193. #endif
  194. /* Optional ECC calculation method */
  195. /* Note: doubles heap usage, but slightly faster */
  196. #undef ECC_SHAMIR
  197. #define ECC_SHAMIR
  198. /* Reduces heap usage, but slower */
  199. #undef ECC_TIMING_RESISTANT
  200. #define ECC_TIMING_RESISTANT
  201. #ifdef HAVE_FIPS
  202. #undef HAVE_ECC_CDH
  203. #define HAVE_ECC_CDH /* Enable cofactor support */
  204. #undef NO_STRICT_ECDSA_LEN
  205. #define NO_STRICT_ECDSA_LEN /* Do not force fixed len w/ FIPS */
  206. #undef WOLFSSL_VALIDATE_ECC_IMPORT
  207. #define WOLFSSL_VALIDATE_ECC_IMPORT /* Validate import */
  208. #undef WOLFSSL_VALIDATE_ECC_KEYGEN
  209. #define WOLFSSL_VALIDATE_ECC_KEYGEN /* Validate generated keys */
  210. #undef WOLFSSL_ECDSA_SET_K
  211. #define WOLFSSL_ECDSA_SET_K
  212. #endif
  213. /* Compressed Key Support */
  214. #undef HAVE_COMP_KEY
  215. //#define HAVE_COMP_KEY
  216. /* Use alternate ECC size for ECC math */
  217. #ifdef USE_FAST_MATH
  218. /* MAX ECC BITS = ROUND8(MAX ECC) * 2 */
  219. #ifdef NO_RSA
  220. /* Custom fastmath size if not using RSA */
  221. #undef FP_MAX_BITS
  222. #define FP_MAX_BITS (256 * 2)
  223. #else
  224. #undef ALT_ECC_SIZE
  225. #define ALT_ECC_SIZE
  226. /* wolfSSL will compute the FP_MAX_BITS_ECC, but it can be overridden */
  227. //#undef FP_MAX_BITS_ECC
  228. //#define FP_MAX_BITS_ECC (256 * 2)
  229. #endif
  230. /* Speedups specific to curve */
  231. #ifndef NO_ECC256
  232. #undef TFM_ECC256
  233. #define TFM_ECC256
  234. #endif
  235. #endif
  236. #endif
  237. /* DH */
  238. #undef NO_DH
  239. #if 1
  240. /* Use table for DH instead of -lm (math) lib dependency */
  241. #if 1
  242. #define HAVE_DH_DEFAULT_PARAMS
  243. #define WOLFSSL_DH_CONST
  244. #define HAVE_FFDHE_2048
  245. #define HAVE_FFDHE_3072
  246. #define HAVE_FFDHE_4096
  247. #define HAVE_FFDHE_6144
  248. #define HAVE_FFDHE_8192
  249. #endif
  250. #ifdef HAVE_FIPS
  251. #define WOLFSSL_VALIDATE_FFC_IMPORT
  252. #define HAVE_FFDHE_Q
  253. #endif
  254. #else
  255. #define NO_DH
  256. #endif
  257. /* AES */
  258. #undef NO_AES
  259. #if 1
  260. #undef HAVE_AES_CBC
  261. #define HAVE_AES_CBC
  262. #undef HAVE_AESGCM
  263. #define HAVE_AESGCM
  264. /* GCM Method (slowest to fastest): GCM_SMALL, GCM_WORD32, GCM_TABLE or
  265. * GCM_TABLE_4BIT */
  266. #define GCM_TABLE_4BIT
  267. #undef WOLFSSL_AES_DIRECT
  268. #define WOLFSSL_AES_DIRECT
  269. #undef HAVE_AES_ECB
  270. #define HAVE_AES_ECB
  271. #undef WOLFSSL_AES_COUNTER
  272. #define WOLFSSL_AES_COUNTER
  273. #undef HAVE_AESCCM
  274. #define HAVE_AESCCM
  275. #undef WOLFSSL_AES_OFB
  276. #define WOLFSSL_AES_OFB
  277. #else
  278. #define NO_AES
  279. #endif
  280. /* DES3 */
  281. #undef NO_DES3
  282. #if 0
  283. #if 1
  284. #undef WOLFSSL_DES_ECB
  285. #define WOLFSSL_DES_ECB
  286. #endif
  287. #else
  288. #define NO_DES3
  289. #endif
  290. /* ChaCha20 / Poly1305 */
  291. #undef HAVE_CHACHA
  292. #undef HAVE_POLY1305
  293. #if 0
  294. #define HAVE_CHACHA
  295. #define HAVE_POLY1305
  296. /* Needed for Poly1305 */
  297. #undef HAVE_ONE_TIME_AUTH
  298. #define HAVE_ONE_TIME_AUTH
  299. #endif
  300. /* Ed25519 / Curve25519 */
  301. #undef HAVE_CURVE25519
  302. #undef HAVE_ED25519
  303. #if 0
  304. #define HAVE_CURVE25519
  305. #define HAVE_ED25519 /* ED25519 Requires SHA512 */
  306. /* Optionally use small math (less flash usage, but much slower) */
  307. #if 1
  308. #define CURVED25519_SMALL
  309. #endif
  310. #endif
  311. /* ------------------------------------------------------------------------- */
  312. /* Hashing */
  313. /* ------------------------------------------------------------------------- */
  314. /* Sha */
  315. #undef NO_SHA
  316. #if 1
  317. /* 1k smaller, but 25% slower */
  318. //#define USE_SLOW_SHA
  319. #else
  320. #define NO_SHA
  321. #endif
  322. /* Sha256 */
  323. #undef NO_SHA256
  324. #if 1
  325. /* not unrolled - ~2k smaller and ~25% slower */
  326. //#define USE_SLOW_SHA256
  327. /* Sha224 */
  328. #if 1
  329. #define WOLFSSL_SHA224
  330. #endif
  331. #else
  332. #define NO_SHA256
  333. #endif
  334. /* Sha512 */
  335. #undef WOLFSSL_SHA512
  336. #if 1
  337. #define WOLFSSL_SHA512
  338. #undef WOLFSSL_NOSHA512_224 /* Not in FIPS mode */
  339. #undef WOLFSSL_NOSHA512_256 /* Not in FIPS mode */
  340. /* Sha384 */
  341. #undef WOLFSSL_SHA384
  342. #if 1
  343. #define WOLFSSL_SHA384
  344. #endif
  345. /* over twice as small, but 50% slower */
  346. //#define USE_SLOW_SHA512
  347. #endif
  348. /* Sha3 */
  349. #undef WOLFSSL_SHA3
  350. #if 1
  351. #define WOLFSSL_SHA3
  352. #define Sha3 wc_Sha3
  353. #endif
  354. /* MD5 */
  355. #undef NO_MD5
  356. #if 0
  357. #else
  358. #define NO_MD5
  359. #endif
  360. /* HKDF / PRF */
  361. #undef HAVE_HKDF
  362. #if 1
  363. #define HAVE_HKDF
  364. #define WOLFSSL_HAVE_PRF
  365. #endif
  366. /* CMAC */
  367. #undef WOLFSSL_CMAC
  368. #if 1
  369. #define WOLFSSL_CMAC
  370. #endif
  371. /* ------------------------------------------------------------------------- */
  372. /* Benchmark / Test */
  373. /* ------------------------------------------------------------------------- */
  374. /* Use reduced benchmark / test sizes */
  375. #undef BENCH_EMBEDDED
  376. #define BENCH_EMBEDDED
  377. #undef USE_CERT_BUFFERS_2048
  378. #define USE_CERT_BUFFERS_2048
  379. #undef USE_CERT_BUFFERS_1024
  380. //#define USE_CERT_BUFFERS_1024
  381. #undef USE_CERT_BUFFERS_256
  382. #define USE_CERT_BUFFERS_256
  383. /* ------------------------------------------------------------------------- */
  384. /* Debugging */
  385. /* ------------------------------------------------------------------------- */
  386. #undef DEBUG_WOLFSSL
  387. #undef NO_ERROR_STRINGS
  388. #if 1
  389. #define DEBUG_WOLFSSL
  390. #else
  391. #if 0
  392. #define NO_ERROR_STRINGS
  393. #endif
  394. #endif
  395. /* ------------------------------------------------------------------------- */
  396. /* Memory */
  397. /* ------------------------------------------------------------------------- */
  398. /* Override Memory API's */
  399. #if 0
  400. #undef XMALLOC_OVERRIDE
  401. #define XMALLOC_OVERRIDE
  402. /* prototypes for user heap override functions */
  403. /* Note: Realloc only required for normal math */
  404. #include <stddef.h> /* for size_t */
  405. extern void *myMalloc(size_t n, void* heap, int type);
  406. extern void myFree(void *p, void* heap, int type);
  407. extern void *myRealloc(void *p, size_t n, void* heap, int type);
  408. #define XMALLOC(n, h, t) myMalloc(n, h, t)
  409. #define XFREE(p, h, t) myFree(p, h, t)
  410. #define XREALLOC(p, n, h, t) myRealloc(p, n, h, t)
  411. #endif
  412. #if 0
  413. /* Static memory requires fast math */
  414. #define WOLFSSL_STATIC_MEMORY
  415. /* Disable fallback malloc/free */
  416. #define WOLFSSL_NO_MALLOC
  417. #if 1
  418. #define WOLFSSL_MALLOC_CHECK /* trap malloc failure */
  419. #endif
  420. #endif
  421. /* Memory callbacks */
  422. #if 1
  423. #undef USE_WOLFSSL_MEMORY
  424. #define USE_WOLFSSL_MEMORY
  425. /* Use this to measure / print heap usage */
  426. #if 0
  427. #undef WOLFSSL_TRACK_MEMORY
  428. // #define WOLFSSL_TRACK_MEMORY
  429. #undef WOLFSSL_DEBUG_MEMORY
  430. //#define WOLFSSL_DEBUG_MEMORY
  431. #undef WOLFSSL_DEBUG_MEMORY_PRINT
  432. //#define WOLFSSL_DEBUG_MEMORY_PRINT
  433. #endif
  434. #else
  435. #ifndef WOLFSSL_STATIC_MEMORY
  436. #define NO_WOLFSSL_MEMORY
  437. /* Otherwise we will use stdlib malloc, free and realloc */
  438. #endif
  439. #endif
  440. /* ------------------------------------------------------------------------- */
  441. /* Port */
  442. /* ------------------------------------------------------------------------- */
  443. /* Override Current Time */
  444. /* Allows custom "custom_time()" function to be used for benchmark */
  445. //#define WOLFSSL_USER_CURRTIME
  446. //#define WOLFSSL_GMTIME
  447. //#define USER_TICKS
  448. //extern unsigned long my_time(unsigned long* timer);
  449. //#define XTIME my_time
  450. /* ------------------------------------------------------------------------- */
  451. /* RNG */
  452. /* ------------------------------------------------------------------------- */
  453. /* Seed Source */
  454. /* Seed Source */
  455. // extern int my_rng_generate_seed(unsigned char* output, int sz);
  456. // #undef CUSTOM_RAND_GENERATE_SEED
  457. // #define CUSTOM_RAND_GENERATE_SEED my_rng_generate_seed
  458. /* Choose RNG method */
  459. #if 1
  460. /* Use built-in P-RNG (SHA256 based) with HW RNG */
  461. /* P-RNG + HW RNG (P-RNG is ~8K) */
  462. //#define WOLFSSL_GENSEED_FORTEST
  463. #undef HAVE_HASHDRBG
  464. #define HAVE_HASHDRBG
  465. #else
  466. #undef WC_NO_HASHDRBG
  467. #define WC_NO_HASHDRBG
  468. /* Bypass P-RNG and use only HW RNG */
  469. extern int my_rng_gen_block(unsigned char* output, unsigned int sz);
  470. #undef CUSTOM_RAND_GENERATE_BLOCK
  471. #define CUSTOM_RAND_GENERATE_BLOCK my_rng_gen_block
  472. #endif
  473. /* ------------------------------------------------------------------------- */
  474. /* Custom Standard Lib */
  475. /* ------------------------------------------------------------------------- */
  476. /* Allows override of all standard library functions */
  477. #undef STRING_USER
  478. #if 0
  479. #define STRING_USER
  480. #include <string.h>
  481. #undef USE_WOLF_STRSEP
  482. #define USE_WOLF_STRSEP
  483. #define XSTRSEP(s1,d) wc_strsep((s1),(d))
  484. #undef USE_WOLF_STRTOK
  485. #define USE_WOLF_STRTOK
  486. #define XSTRTOK(s1,d,ptr) wc_strtok((s1),(d),(ptr))
  487. #define XSTRNSTR(s1,s2,n) mystrnstr((s1),(s2),(n))
  488. #define XMEMCPY(d,s,l) memcpy((d),(s),(l))
  489. #define XMEMSET(b,c,l) memset((b),(c),(l))
  490. #define XMEMCMP(s1,s2,n) memcmp((s1),(s2),(n))
  491. #define XMEMMOVE(d,s,l) memmove((d),(s),(l))
  492. #define XSTRLEN(s1) strlen((s1))
  493. #define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))
  494. #define XSTRSTR(s1,s2) strstr((s1),(s2))
  495. #define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n))
  496. #define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n))
  497. #define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
  498. #define XSNPRINTF snprintf
  499. #endif
  500. /* ------------------------------------------------------------------------- */
  501. /* Enable Features */
  502. /* ------------------------------------------------------------------------- */
  503. #undef WOLFSSL_ASN_TEMPLATE
  504. #define WOLFSSL_ASN_TEMPLATE
  505. #undef WOLFSSL_ASN_PRINT
  506. #define WOLFSSL_ASN_PRINT
  507. #undef WOLFSSL_TLS13
  508. #if 1
  509. #define WOLFSSL_TLS13
  510. #endif
  511. #undef WOLFSSL_KEY_GEN
  512. #if 1
  513. #define WOLFSSL_KEY_GEN
  514. #endif
  515. #undef KEEP_PEER_CERT
  516. //#define KEEP_PEER_CERT
  517. #undef HAVE_TLS_EXTENSIONS
  518. #define HAVE_TLS_EXTENSIONS
  519. #undef HAVE_EXTENDED_MASTER
  520. #define HAVE_EXTENDED_MASTER
  521. #undef HAVE_SUPPORTED_CURVES
  522. #define HAVE_SUPPORTED_CURVES
  523. #undef WOLFSSL_BASE64_ENCODE
  524. #define WOLFSSL_BASE64_ENCODE
  525. #undef WOLFSSL_NO_HASH_RAW
  526. #define WOLFSSL_NO_HASH_RAW
  527. /* TLS Session Cache */
  528. #if 0
  529. #define SMALL_SESSION_CACHE
  530. #else
  531. #define NO_SESSION_CACHE
  532. #endif
  533. #undef OPENSSL_EXTRA
  534. //#define OPENSSL_EXTRA
  535. #undef WOLFSSL_DER_LOAD
  536. #define WOLFSSL_DER_LOAD
  537. #undef HAVE_SESSION_TICKET
  538. #define HAVE_SESSION_TICKET
  539. #undef HAVE_EX_DATA
  540. #define HAVE_EX_DATA
  541. #undef HAVE_ENCRYPT_THEN_MAC
  542. #define HAVE_ENCRYPT_THEN_MAC
  543. #undef WOLFSSL_CERT_GEN
  544. #define WOLFSSL_CERT_GEN
  545. #undef ATOMIC_USER
  546. #define ATOMIC_USER
  547. #undef HAVE_SECRET_CALLBACK
  548. #define HAVE_SECRET_CALLBACK
  549. /* wolfEngine */
  550. #if 1
  551. #define OPENSSL_COEXIST
  552. /* HKDF for engine */
  553. #undef HAVE_HKDF
  554. #if 1
  555. #define HAVE_HKDF
  556. #define HAVE_X963_KDF
  557. #endif
  558. #undef WOLFSSL_PUBLIC_MP
  559. #define WOLFSSL_PUBLIC_MP
  560. #undef NO_OLD_RNGNAME
  561. #define NO_OLD_RNGNAME
  562. #undef NO_OLD_WC_NAMES
  563. #define NO_OLD_WC_NAMES
  564. #undef NO_OLD_SSL_NAMES
  565. #define NO_OLD_SSL_NAMES
  566. #undef NO_OLD_SHA_NAMES
  567. #define NO_OLD_SHA_NAMES
  568. #undef NO_OLD_MD5_NAME
  569. #define NO_OLD_MD5_NAME
  570. #undef NO_OLD_SHA256_NAMES
  571. #define NO_OLD_SHA256_NAMES
  572. #endif
  573. #undef WOLFSSL_SYS_CA_CERTS
  574. #define WOLFSSL_SYS_CA_CERTS
  575. #undef LIBWOLFSSL_GLOBAL_EXTRA_CFLAGS
  576. #define LIBWOLFSSL_GLOBAL_EXTRA_CFLAGS
  577. #undef HAVE_SERVER_RENEGOTIATION_INFO
  578. #define HAVE_SERVER_RENEGOTIATION_INFO
  579. /* ------------------------------------------------------------------------- */
  580. /* Disable Features */
  581. /* ------------------------------------------------------------------------- */
  582. #undef NO_WOLFSSL_SERVER
  583. //#define NO_WOLFSSL_SERVER
  584. #undef NO_WOLFSSL_CLIENT
  585. //#define NO_WOLFSSL_CLIENT
  586. #undef NO_CRYPT_TEST
  587. //#define NO_CRYPT_TEST
  588. #undef NO_CRYPT_BENCHMARK
  589. //#define NO_CRYPT_BENCHMARK
  590. #undef WOLFCRYPT_ONLY
  591. #define WOLFCRYPT_ONLY
  592. /* In-lining of misc.c functions */
  593. /* If defined, must include wolfcrypt/src/misc.c in build */
  594. /* Slower, but about 1k smaller */
  595. #undef NO_INLINE
  596. //#define NO_INLINE
  597. #undef NO_FILESYSTEM
  598. //#define NO_FILESYSTEM
  599. #undef NO_WRITEV
  600. //#define NO_WRITEV
  601. #undef NO_MAIN_DRIVER
  602. #define NO_MAIN_DRIVER
  603. #undef NO_DEV_RANDOM
  604. //#define NO_DEV_RANDOM
  605. #undef NO_DSA
  606. #define NO_DSA
  607. #undef NO_RC4
  608. #define NO_RC4
  609. #undef NO_OLD_TLS
  610. #define NO_OLD_TLS
  611. #undef NO_PSK
  612. #define NO_PSK
  613. #undef NO_MD4
  614. #define NO_MD4
  615. #undef NO_PWDBASED
  616. //#define NO_PWDBASED
  617. #undef NO_CODING
  618. //#define NO_CODING
  619. #undef NO_ASN_TIME
  620. //#define NO_ASN_TIME
  621. #undef NO_CERTS
  622. //#define NO_CERTS
  623. #undef NO_SIG_WRAPPER
  624. //#define NO_SIG_WRAPPER
  625. #undef NO_DO178
  626. #define NO_DO178
  627. #undef WOLFSSL_NO_SHAKE128
  628. #define WOLFSSL_NO_SHAKE128
  629. #undef WOLFSSL_NO_SHAKE256
  630. #define WOLFSSL_NO_SHAKE256
  631. /* wolfSSL engineering ACVP algo and operational testing only (Default: Off) */
  632. #if 1
  633. #undef WOLFSSL_PUBLIC_MP
  634. #define WOLFSSL_PUBLIC_MP
  635. #undef OPTEST_LOGGING_ENABLED
  636. //#define OPTEST_LOGGING_ENABLED
  637. #undef OPTEST_INVALID_LOGGING_ENABLED
  638. //#define OPTEST_INVALID_LOGGING_ENABLED
  639. #undef NO_MAIN_OPTEST_DRIVER
  640. #define NO_MAIN_OPTEST_DRIVER
  641. #undef DEBUG_FIPS_VERBOSE
  642. #define DEBUG_FIPS_VERBOSE
  643. #undef HAVE_FORCE_FIPS_FAILURE
  644. #define HAVE_FORCE_FIPS_FAILURE
  645. #undef NO_WRITE_TEMP_FILES
  646. #define NO_WRITE_TEMPT_FILES
  647. #endif
  648. #ifdef __cplusplus
  649. }
  650. #endif
  651. #endif /* WOLFSSL_USER_SETTINGS_H */