SharkSSL™ Embedded SSL/TLS Stack
SharkSSL_cfg.h
1 /*
2  * ____ _________ __ _
3  * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4  * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5  * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6  * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7  * /____/
8  *
9  * SharkSSL Embedded SSL/TLS Stack
10  ****************************************************************************
11  * PROGRAM MODULE
12  *
13  * $Id: SharkSSL_cfg.h 5100 2022-02-19 16:23:57Z wini $
14  *
15  * COPYRIGHT: Real Time Logic LLC, 2010 - 2022
16  *
17  * This software is copyrighted by and is the sole property of Real
18  * Time Logic LLC. All rights, title, ownership, or other interests in
19  * the software remain the property of Real Time Logic LLC. This
20  * software may only be used in accordance with the terms and
21  * conditions stipulated in the corresponding license agreement under
22  * which the software has been supplied. Any unauthorized use,
23  * duplication, transmission, distribution, or disclosure of this
24  * software is expressly forbidden.
25  *
26  * This Copyright notice may not be removed or modified without prior
27  * written consent of Real Time Logic LLC.
28  *
29  * Real Time Logic LLC. reserves the right to modify this software
30  * without notice.
31  *
32  * http://www.realtimelogic.com
33  * http://www.sharkssl.com
34  ****************************************************************************
35 
36 
37  Do not directly edit the options in this file. Instead, add your
38  custom options in SharkSSL_opts.h
39 
40  */
41 #ifndef _SharkSsl_cfg_h
42 #define _SharkSsl_cfg_h
43 
44 #include "SharkSSL_opts.h"
45 
52 #ifndef SHARKSSL_USE_AES_256
53 #define SHARKSSL_USE_AES_256 1
54 #endif
55 
58 #ifndef SHARKSSL_USE_AES_128
59 #define SHARKSSL_USE_AES_128 1
60 #endif
61 
66 #ifndef SHARKSSL_USE_AES_192
67 #define SHARKSSL_USE_AES_192 0
68 #endif
69 
74 #ifndef SHARKSSL_ENABLE_AES_GCM
75 #define SHARKSSL_ENABLE_AES_GCM 1
76 #endif
77 
82 #ifndef SHARKSSL_ENABLE_AES_CCM
83 #define SHARKSSL_ENABLE_AES_CCM 0
84 #endif
85 
91 #ifndef SHARKSSL_ENABLE_AES_CBC
92 #define SHARKSSL_ENABLE_AES_CBC 0
93 #endif
94 
99 #ifndef SHARKSSL_USE_CHACHA20
100 #define SHARKSSL_USE_CHACHA20 1
101 #endif
102 
103 
113 #ifndef SHARKSSL_USE_SHA_256
114 #define SHARKSSL_USE_SHA_256 1
115 #endif
116 
120 #ifndef SHARKSSL_USE_SHA_384
121 #define SHARKSSL_USE_SHA_384 1
122 #endif
123 
127 #ifndef SHARKSSL_USE_SHA_512
128 #define SHARKSSL_USE_SHA_512 0
129 #endif
130 
131 
136 #ifndef SHARKSSL_USE_SHA1
137 #define SHARKSSL_USE_SHA1 1
138 #endif
139 
142 #ifndef SHARKSSL_USE_MD5
143 #define SHARKSSL_USE_MD5 0
144 #endif
145 
150 #ifndef SHARKSSL_USE_POLY1305
151 #define SHARKSSL_USE_POLY1305 1
152 #endif
153  /* end group SharkSslCfgHash */
155 
156 
160 #ifndef SHARKSSL_SSL_SERVER_CODE
161 #define SHARKSSL_SSL_SERVER_CODE 1
162 #endif
163 
164 
168 #ifndef SHARKSSL_ENABLE_CLIENT_AUTH
169 #define SHARKSSL_ENABLE_CLIENT_AUTH 1
170 #endif
171 
172 
176 #ifndef SHARKSSL_SSL_CLIENT_CODE
177 #define SHARKSSL_SSL_CLIENT_CODE 1
178 #endif
179 
180 
184 #ifndef SHARKSSL_ENABLE_SNI
185 #define SHARKSSL_ENABLE_SNI 1
186 #endif
187 
188 
192 #ifndef SHARKSSL_ENABLE_RSA
193 #define SHARKSSL_ENABLE_RSA 1
194 #endif
195 
196 
200 #ifndef SHARKSSL_ENABLE_SESSION_CACHE
201 #define SHARKSSL_ENABLE_SESSION_CACHE 1
202 #endif
203 
204 
209 #ifndef SHARKSSL_ENABLE_SECURE_RENEGOTIATION
210 #define SHARKSSL_ENABLE_SECURE_RENEGOTIATION 1
211 #endif
212 
213 
214 /*
215  * TLS 1.2 requires SHA-256, do not modify the following settings
216  * DES and ClientHello v2.0 are deprecated in TLS 1.2 - RFC5246
217  */
218 #undef SHARKSSL_USE_SHA_256
219 #define SHARKSSL_USE_SHA_256 1
220 
221 
225 #ifndef SHARKSSL_ENABLE_DHE_RSA
226 #define SHARKSSL_ENABLE_DHE_RSA 1
227 #endif
228 
229 
232 #ifndef SHARKSSL_ENABLE_SELECT_CIPHERSUITE
233 #define SHARKSSL_ENABLE_SELECT_CIPHERSUITE 1
234 #endif
235 
236 
241 #ifndef SHARKSSL_SELECT_CIPHERSUITE_LIST_DEPTH
242 #define SHARKSSL_SELECT_CIPHERSUITE_LIST_DEPTH 8
243 #endif
244 
245 
248 #ifndef SHARKSSL_ENABLE_ALPN_EXTENSION
249 #define SHARKSSL_ENABLE_ALPN_EXTENSION 1
250 #endif
251 
252 
257 #ifndef SHARKSSL_ENABLE_RSA_API
258 #define SHARKSSL_ENABLE_RSA_API 1
259 #endif
260 
261 
266 #ifndef SHARKSSL_ENABLE_RSA_PKCS1
267 #define SHARKSSL_ENABLE_RSA_PKCS1 1
268 #endif
269 
270 
274 #ifndef SHARKSSL_ENABLE_RSA_OAEP
275 #define SHARKSSL_ENABLE_RSA_OAEP 0
276 #endif
277 
278 
282 #ifndef SHARKSSL_ENABLE_ECDSA_API
283 #define SHARKSSL_ENABLE_ECDSA_API 1
284 #endif
285 
286 
293 #ifndef SHARKSSL_ECDSA_ONLY_VERIFY
294 #define SHARKSSL_ECDSA_ONLY_VERIFY 0
295 #endif
296 
297 
305 #ifndef SHARKSSL_ENABLE_PEM_API
306 #define SHARKSSL_ENABLE_PEM_API 1
307 #endif
308 
309 
314 #ifndef SHARKSSL_ENABLE_ENCRYPTED_PKCS8_SUPPORT
315 #define SHARKSSL_ENABLE_ENCRYPTED_PKCS8_SUPPORT 0
316 #endif
317 
318 
321 #ifndef SHARKSSL_ENABLE_INFO_API
322 #define SHARKSSL_ENABLE_INFO_API 1
323 #endif
324 
325 
329 #ifndef SHARKSSL_ENABLE_CERT_CHAIN
330 #define SHARKSSL_ENABLE_CERT_CHAIN 1
331 #endif
332 
333 
338 #ifndef SHARKSSL_ENABLE_CA_LIST
339 #define SHARKSSL_ENABLE_CA_LIST 1
340 #endif
341 
342 
346 #ifndef SHARKSSL_ENABLE_CERTSTORE_API
347 #define SHARKSSL_ENABLE_CERTSTORE_API 1
348 #endif
349 
350 
354 #ifndef SHARKSSL_ENABLE_CLONE_CERTINFO
355 #define SHARKSSL_ENABLE_CLONE_CERTINFO 1
356 #endif
357 
358 
363 #ifndef SHARKSSL_ENABLE_CERT_KEYUSAGE
364 #define SHARKSSL_ENABLE_CERT_KEYUSAGE 0
365 #endif
366 
367 
375 #ifndef SHARKSSL_MD5_SMALL_FOOTPRINT
376 #define SHARKSSL_MD5_SMALL_FOOTPRINT 0
377 #endif
378 
379 #ifndef SHARKSSL_SHA1_SMALL_FOOTPRINT
380 #define SHARKSSL_SHA1_SMALL_FOOTPRINT 0
381 #endif
382 
385 #ifndef SHARKSSL_SHA256_SMALL_FOOTPRINT
386 #define SHARKSSL_SHA256_SMALL_FOOTPRINT 0
387 #endif
388 
389 
393 #ifndef SHARKSSL_BIGINT_EXP_SLIDING_WINDOW_K
394 #define SHARKSSL_BIGINT_EXP_SLIDING_WINDOW_K 4
395 #endif
396 
397 
401 #ifndef SHARKSSL_BIGINT_MULT_LOOP_UNROLL
402 #define SHARKSSL_BIGINT_MULT_LOOP_UNROLL 1
403 #endif
404 
405 
409 #ifndef SHARKSSL_ENABLE_AES_CTR_MODE
410 #define SHARKSSL_ENABLE_AES_CTR_MODE 1
411 #endif
412 
413 
417 #ifndef SHARKSSL_AES_CIPHER_LOOP_UNROLL
418 #define SHARKSSL_AES_CIPHER_LOOP_UNROLL 1
419 #endif
420 
421 
426 #ifndef SHARKSSL_UNALIGNED_ACCESS
427 #ifdef UNALIGNED_ACCESS
428 #define SHARKSSL_UNALIGNED_ACCESS 1
429 #else
430 #define SHARKSSL_UNALIGNED_ACCESS 0
431 #endif
432 #endif
433 
434 
438 #ifndef SHARKSSL_BIGINT_WORDSIZE
439 #define SHARKSSL_BIGINT_WORDSIZE 32
440 #endif
441 
442 
446 #ifndef SHARKSSL_USE_ECC
447 #define SHARKSSL_USE_ECC 1
448 #endif
449 
450 
455 #ifndef SHARKSSL_ENABLE_ECDSA
456 #define SHARKSSL_ENABLE_ECDSA 1
457 #endif
458 
459 
466 #ifndef SHARKSSL_ECC_VERIFY_POINT
467 #define SHARKSSL_ECC_VERIFY_POINT 1
468 #endif
469 
470 
473 #ifndef SHARKSSL_ECC_TIMING_RESISTANT
474 #define SHARKSSL_ECC_TIMING_RESISTANT 0
475 #endif
476 
479 #ifndef SHARKSSL_ECC_USE_SECP256R1
480 #define SHARKSSL_ECC_USE_SECP256R1 1
481 #endif
482 
485 #ifndef SHARKSSL_ECC_USE_SECP384R1
486 #define SHARKSSL_ECC_USE_SECP384R1 1
487 #endif
488 
491 #ifndef SHARKSSL_ECC_USE_SECP521R1
492 #define SHARKSSL_ECC_USE_SECP521R1 1
493 #endif
494 
495 
498 #ifndef SHARKSSL_ECC_USE_BRAINPOOLP256R1
499 #define SHARKSSL_ECC_USE_BRAINPOOLP256R1 1
500 #endif
501 
504 #ifndef SHARKSSL_ECC_USE_BRAINPOOLP384R1
505 #define SHARKSSL_ECC_USE_BRAINPOOLP384R1 1
506 #endif
507 
510 #ifndef SHARKSSL_ECC_USE_BRAINPOOLP512R1
511 #define SHARKSSL_ECC_USE_BRAINPOOLP512R1 1
512 #endif
513 
514 
519 #ifndef SHARKSSL_ENABLE_ECDHE_RSA
520 #define SHARKSSL_ENABLE_ECDHE_RSA 1
521 #endif
522 
523 
529 #ifndef SHARKSSL_ENABLE_ECDHE_ECDSA
530 #define SHARKSSL_ENABLE_ECDHE_ECDSA 1
531 #endif
532 
533 
536 #ifndef SHARKSSL_OPTIMIZED_BIGINT_ASM
537 #define SHARKSSL_OPTIMIZED_BIGINT_ASM 0
538 #endif
539 
542 #ifndef SHARKSSL_OPTIMIZED_CHACHA_ASM
543 #define SHARKSSL_OPTIMIZED_CHACHA_ASM 0
544 #endif
545 
548 #ifndef SHARKSSL_OPTIMIZED_POLY1305_ASM
549 #define SHARKSSL_OPTIMIZED_POLY1305_ASM 0
550 #endif
551 
552 
559 #ifndef SHARKSSL_USE_RNG_TINYMT
560 #define SHARKSSL_USE_RNG_TINYMT 0
561 #endif
562 
570 #ifndef SHARKSSL_USE_RNG_FORTUNA
571 #define SHARKSSL_USE_RNG_FORTUNA 0
572 #endif
573 
574 
580 #ifndef SHARKSSL_RNG_MULTITHREADED
581 #define SHARKSSL_RNG_MULTITHREADED 1
582 #endif
583 
585 #ifndef SHARKSSL_NOPACK
586 #define SHARKSSL_NOPACK 0
587 #endif
588 
594 #ifdef __DOXYGEN__
595 #define SHARKSSL_CHECK_DATE 0
596 #endif
597 #ifndef SHARKSSL_CHECK_DATE
598 #ifdef SHARKSSL_BA /* if SharkSSL embedded in BAS */
599 #define SHARKSSL_CHECK_DATE 1
600 #else
601 #define SHARKSSL_CHECK_DATE 0
602 #endif
603 #endif
604 
605  /* end group SharkSslCfg */
607 
608 #endif