2
0

user_settings.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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. /* Note2: XFREE(NULL) must be properly handled */
  405. #include <stddef.h> /* for size_t */
  406. extern void *myMalloc(size_t n, void* heap, int type);
  407. extern void myFree(void *p, void* heap, int type);
  408. extern void *myRealloc(void *p, size_t n, void* heap, int type);
  409. #define XMALLOC(n, h, t) myMalloc(n, h, t)
  410. #define XFREE(p, h, t) myFree(p, h, t)
  411. #define XREALLOC(p, n, h, t) myRealloc(p, n, h, t)
  412. #endif
  413. #if 0
  414. /* Static memory requires fast math */
  415. #define WOLFSSL_STATIC_MEMORY
  416. /* Disable fallback malloc/free */
  417. #define WOLFSSL_NO_MALLOC
  418. #if 1
  419. #define WOLFSSL_MALLOC_CHECK /* trap malloc failure */
  420. #endif
  421. #endif
  422. /* Memory callbacks */
  423. #if 1
  424. #undef USE_WOLFSSL_MEMORY
  425. #define USE_WOLFSSL_MEMORY
  426. /* Use this to measure / print heap usage */
  427. #if 0
  428. #undef WOLFSSL_TRACK_MEMORY
  429. // #define WOLFSSL_TRACK_MEMORY
  430. #undef WOLFSSL_DEBUG_MEMORY
  431. //#define WOLFSSL_DEBUG_MEMORY
  432. #undef WOLFSSL_DEBUG_MEMORY_PRINT
  433. //#define WOLFSSL_DEBUG_MEMORY_PRINT
  434. #endif
  435. #else
  436. #ifndef WOLFSSL_STATIC_MEMORY
  437. #define NO_WOLFSSL_MEMORY
  438. /* Otherwise we will use stdlib malloc, free and realloc */
  439. #endif
  440. #endif
  441. /* ------------------------------------------------------------------------- */
  442. /* Port */
  443. /* ------------------------------------------------------------------------- */
  444. /* Override Current Time */
  445. /* Allows custom "custom_time()" function to be used for benchmark */
  446. //#define WOLFSSL_USER_CURRTIME
  447. //#define WOLFSSL_GMTIME
  448. //#define USER_TICKS
  449. //extern unsigned long my_time(unsigned long* timer);
  450. //#define XTIME my_time
  451. /* ------------------------------------------------------------------------- */
  452. /* RNG */
  453. /* ------------------------------------------------------------------------- */
  454. /* Seed Source */
  455. /* Seed Source */
  456. // extern int my_rng_generate_seed(unsigned char* output, int sz);
  457. // #undef CUSTOM_RAND_GENERATE_SEED
  458. // #define CUSTOM_RAND_GENERATE_SEED my_rng_generate_seed
  459. /* Choose RNG method */
  460. #if 1
  461. /* Use built-in P-RNG (SHA256 based) with HW RNG */
  462. /* P-RNG + HW RNG (P-RNG is ~8K) */
  463. //#define WOLFSSL_GENSEED_FORTEST
  464. #undef HAVE_HASHDRBG
  465. #define HAVE_HASHDRBG
  466. #else
  467. #undef WC_NO_HASHDRBG
  468. #define WC_NO_HASHDRBG
  469. /* Bypass P-RNG and use only HW RNG */
  470. extern int my_rng_gen_block(unsigned char* output, unsigned int sz);
  471. #undef CUSTOM_RAND_GENERATE_BLOCK
  472. #define CUSTOM_RAND_GENERATE_BLOCK my_rng_gen_block
  473. #endif
  474. /* ------------------------------------------------------------------------- */
  475. /* Custom Standard Lib */
  476. /* ------------------------------------------------------------------------- */
  477. /* Allows override of all standard library functions */
  478. #undef STRING_USER
  479. #if 0
  480. #define STRING_USER
  481. #include <string.h>
  482. #undef USE_WOLF_STRSEP
  483. #define USE_WOLF_STRSEP
  484. #define XSTRSEP(s1,d) wc_strsep((s1),(d))
  485. #undef USE_WOLF_STRTOK
  486. #define USE_WOLF_STRTOK
  487. #define XSTRTOK(s1,d,ptr) wc_strtok((s1),(d),(ptr))
  488. #define XSTRNSTR(s1,s2,n) mystrnstr((s1),(s2),(n))
  489. #define XMEMCPY(d,s,l) memcpy((d),(s),(l))
  490. #define XMEMSET(b,c,l) memset((b),(c),(l))
  491. #define XMEMCMP(s1,s2,n) memcmp((s1),(s2),(n))
  492. #define XMEMMOVE(d,s,l) memmove((d),(s),(l))
  493. #define XSTRLEN(s1) strlen((s1))
  494. #define XSTRNCPY(s1,s2,n) strncpy((s1),(s2),(n))
  495. #define XSTRSTR(s1,s2) strstr((s1),(s2))
  496. #define XSTRNCMP(s1,s2,n) strncmp((s1),(s2),(n))
  497. #define XSTRNCAT(s1,s2,n) strncat((s1),(s2),(n))
  498. #define XSTRNCASECMP(s1,s2,n) strncasecmp((s1),(s2),(n))
  499. #define XSNPRINTF snprintf
  500. #endif
  501. /* ------------------------------------------------------------------------- */
  502. /* Enable Features */
  503. /* ------------------------------------------------------------------------- */
  504. #undef WOLFSSL_ASN_TEMPLATE
  505. #define WOLFSSL_ASN_TEMPLATE
  506. #undef WOLFSSL_ASN_PRINT
  507. #define WOLFSSL_ASN_PRINT
  508. #undef WOLFSSL_TLS13
  509. #if 1
  510. #define WOLFSSL_TLS13
  511. #endif
  512. #undef WOLFSSL_KEY_GEN
  513. #if 1
  514. #define WOLFSSL_KEY_GEN
  515. #endif
  516. #undef KEEP_PEER_CERT
  517. //#define KEEP_PEER_CERT
  518. #undef HAVE_TLS_EXTENSIONS
  519. #define HAVE_TLS_EXTENSIONS
  520. #undef HAVE_EXTENDED_MASTER
  521. #define HAVE_EXTENDED_MASTER
  522. #undef HAVE_SUPPORTED_CURVES
  523. #define HAVE_SUPPORTED_CURVES
  524. #undef WOLFSSL_BASE64_ENCODE
  525. #define WOLFSSL_BASE64_ENCODE
  526. #undef WOLFSSL_NO_HASH_RAW
  527. #define WOLFSSL_NO_HASH_RAW
  528. /* TLS Session Cache */
  529. #if 0
  530. #define SMALL_SESSION_CACHE
  531. #else
  532. #define NO_SESSION_CACHE
  533. #endif
  534. #undef OPENSSL_EXTRA
  535. //#define OPENSSL_EXTRA
  536. #undef WOLFSSL_DER_LOAD
  537. #define WOLFSSL_DER_LOAD
  538. #undef HAVE_SESSION_TICKET
  539. #define HAVE_SESSION_TICKET
  540. #undef HAVE_EX_DATA
  541. #define HAVE_EX_DATA
  542. #undef HAVE_ENCRYPT_THEN_MAC
  543. #define HAVE_ENCRYPT_THEN_MAC
  544. #undef WOLFSSL_CERT_GEN
  545. #define WOLFSSL_CERT_GEN
  546. #undef ATOMIC_USER
  547. #define ATOMIC_USER
  548. #undef HAVE_SECRET_CALLBACK
  549. #define HAVE_SECRET_CALLBACK
  550. /* wolfEngine */
  551. #if 1
  552. #define OPENSSL_COEXIST
  553. /* HKDF for engine */
  554. #undef HAVE_HKDF
  555. #if 1
  556. #define HAVE_HKDF
  557. #define HAVE_X963_KDF
  558. #endif
  559. #undef WOLFSSL_PUBLIC_MP
  560. #define WOLFSSL_PUBLIC_MP
  561. #undef NO_OLD_RNGNAME
  562. #define NO_OLD_RNGNAME
  563. #undef NO_OLD_WC_NAMES
  564. #define NO_OLD_WC_NAMES
  565. #undef NO_OLD_SSL_NAMES
  566. #define NO_OLD_SSL_NAMES
  567. #undef NO_OLD_SHA_NAMES
  568. #define NO_OLD_SHA_NAMES
  569. #undef NO_OLD_MD5_NAME
  570. #define NO_OLD_MD5_NAME
  571. #undef NO_OLD_SHA256_NAMES
  572. #define NO_OLD_SHA256_NAMES
  573. #endif
  574. #undef WOLFSSL_SYS_CA_CERTS
  575. #define WOLFSSL_SYS_CA_CERTS
  576. #undef LIBWOLFSSL_GLOBAL_EXTRA_CFLAGS
  577. #define LIBWOLFSSL_GLOBAL_EXTRA_CFLAGS
  578. #undef HAVE_SERVER_RENEGOTIATION_INFO
  579. #define HAVE_SERVER_RENEGOTIATION_INFO
  580. /* ------------------------------------------------------------------------- */
  581. /* Disable Features */
  582. /* ------------------------------------------------------------------------- */
  583. #undef NO_WOLFSSL_SERVER
  584. //#define NO_WOLFSSL_SERVER
  585. #undef NO_WOLFSSL_CLIENT
  586. //#define NO_WOLFSSL_CLIENT
  587. #undef NO_CRYPT_TEST
  588. //#define NO_CRYPT_TEST
  589. #undef NO_CRYPT_BENCHMARK
  590. //#define NO_CRYPT_BENCHMARK
  591. #undef WOLFCRYPT_ONLY
  592. #define WOLFCRYPT_ONLY
  593. /* In-lining of misc.c functions */
  594. /* If defined, must include wolfcrypt/src/misc.c in build */
  595. /* Slower, but about 1k smaller */
  596. #undef NO_INLINE
  597. //#define NO_INLINE
  598. #undef NO_FILESYSTEM
  599. //#define NO_FILESYSTEM
  600. #undef NO_WRITEV
  601. //#define NO_WRITEV
  602. #undef NO_MAIN_DRIVER
  603. #define NO_MAIN_DRIVER
  604. #undef NO_DEV_RANDOM
  605. //#define NO_DEV_RANDOM
  606. #undef NO_DSA
  607. #define NO_DSA
  608. #undef NO_RC4
  609. #define NO_RC4
  610. #undef NO_OLD_TLS
  611. #define NO_OLD_TLS
  612. #undef NO_PSK
  613. #define NO_PSK
  614. #undef NO_MD4
  615. #define NO_MD4
  616. #undef NO_PWDBASED
  617. //#define NO_PWDBASED
  618. #undef NO_CODING
  619. //#define NO_CODING
  620. #undef NO_ASN_TIME
  621. //#define NO_ASN_TIME
  622. #undef NO_CERTS
  623. //#define NO_CERTS
  624. #undef NO_SIG_WRAPPER
  625. //#define NO_SIG_WRAPPER
  626. #undef NO_DO178
  627. #define NO_DO178
  628. #undef WOLFSSL_NO_SHAKE128
  629. #define WOLFSSL_NO_SHAKE128
  630. #undef WOLFSSL_NO_SHAKE256
  631. #define WOLFSSL_NO_SHAKE256
  632. /* wolfSSL engineering ACVP algo and operational testing only (Default: Off) */
  633. #if 1
  634. #undef WOLFSSL_PUBLIC_MP
  635. #define WOLFSSL_PUBLIC_MP
  636. #undef OPTEST_LOGGING_ENABLED
  637. //#define OPTEST_LOGGING_ENABLED
  638. #undef OPTEST_INVALID_LOGGING_ENABLED
  639. //#define OPTEST_INVALID_LOGGING_ENABLED
  640. #undef NO_MAIN_OPTEST_DRIVER
  641. #define NO_MAIN_OPTEST_DRIVER
  642. #undef DEBUG_FIPS_VERBOSE
  643. #define DEBUG_FIPS_VERBOSE
  644. #undef HAVE_FORCE_FIPS_FAILURE
  645. #define HAVE_FORCE_FIPS_FAILURE
  646. #undef NO_WRITE_TEMP_FILES
  647. #define NO_WRITE_TEMPT_FILES
  648. #endif
  649. #ifdef __cplusplus
  650. }
  651. #endif
  652. #endif /* WOLFSSL_USER_SETTINGS_H */