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 5858 2026-08-22 14:40:42Z gianluca $
14
*
15
* COPYRIGHT: Real Time Logic LLC, 2010 - 2026
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
53
#ifndef SHARKSSL_TLS_1_3
54
#define SHARKSSL_TLS_1_3 1
55
#endif
56
60
#ifndef SHARKSSL_TLS_1_2
61
#define SHARKSSL_TLS_1_2 1
62
#endif
63
66
#ifndef SHARKSSL_USE_AES_256
67
#define SHARKSSL_USE_AES_256 1
68
#endif
69
72
#ifndef SHARKSSL_USE_AES_128
73
#define SHARKSSL_USE_AES_128 1
74
#endif
75
80
#ifndef SHARKSSL_USE_AES_192
81
#define SHARKSSL_USE_AES_192 0
82
#endif
83
88
#ifndef SHARKSSL_ENABLE_AES_GCM
89
#define SHARKSSL_ENABLE_AES_GCM 1
90
#endif
91
96
#ifndef SHARKSSL_ENABLE_AES_CCM
97
#define SHARKSSL_ENABLE_AES_CCM 0
98
#endif
99
105
#ifndef SHARKSSL_ENABLE_AES_CBC
106
#define SHARKSSL_ENABLE_AES_CBC 0
107
#endif
108
113
#ifndef SHARKSSL_USE_CHACHA20
114
#define SHARKSSL_USE_CHACHA20 1
115
#endif
116
117
127
#ifndef SHARKSSL_USE_SHA_256
128
#define SHARKSSL_USE_SHA_256 1
129
#endif
130
134
#ifndef SHARKSSL_USE_SHA_384
135
#define SHARKSSL_USE_SHA_384 1
136
#endif
137
141
#ifndef SHARKSSL_USE_SHA_512
142
#define SHARKSSL_USE_SHA_512 0
143
#endif
144
145
150
#ifndef SHARKSSL_USE_SHA1
151
#define SHARKSSL_USE_SHA1 0
152
#endif
153
156
#ifndef SHARKSSL_USE_MD5
157
#define SHARKSSL_USE_MD5 0
158
#endif
159
164
#ifndef SHARKSSL_USE_POLY1305
165
#define SHARKSSL_USE_POLY1305 1
166
#endif
167
/* end group SharkSslCfgHash */
169
170
173
#ifndef SHARKSSL_SSL_SERVER_CODE
174
#define SHARKSSL_SSL_SERVER_CODE 1
175
#endif
176
177
180
#ifndef SHARKSSL_ENABLE_CLIENT_AUTH
181
#define SHARKSSL_ENABLE_CLIENT_AUTH 1
182
#endif
183
184
192
#ifndef SHARKSSL_ENABLE_POST_HANDSHAKE_AUTH
193
#define SHARKSSL_ENABLE_POST_HANDSHAKE_AUTH 0
194
#endif
195
196
199
#ifndef SHARKSSL_SSL_CLIENT_CODE
200
#define SHARKSSL_SSL_CLIENT_CODE 1
201
#endif
202
203
206
#ifndef SHARKSSL_RANDOMIZE_EXTENSIONS
207
#define SHARKSSL_RANDOMIZE_EXTENSIONS 1
208
#endif
209
210
213
#ifndef SHARKSSL_ENABLE_SNI
214
#define SHARKSSL_ENABLE_SNI 1
215
#endif
216
217
222
#ifndef SHARKSSL_ENABLE_CA_EXTENSION
223
#define SHARKSSL_ENABLE_CA_EXTENSION 1
224
#endif
225
226
229
#ifndef SHARKSSL_ENABLE_RSA
230
#define SHARKSSL_ENABLE_RSA 1
231
#endif
232
233
236
#ifndef SHARKSSL_ENABLE_SESSION_CACHE
237
#define SHARKSSL_ENABLE_SESSION_CACHE 1
238
#endif
239
240
247
#ifndef SHARKSSL_ENABLE_SECURE_RENEGOTIATION
248
#define SHARKSSL_ENABLE_SECURE_RENEGOTIATION SHARKSSL_TLS_1_2
249
#endif
250
251
256
#ifndef SHARKSSL_ENABLE_DHE_RSA
257
#define SHARKSSL_ENABLE_DHE_RSA SHARKSSL_TLS_1_2
258
#endif
259
260
264
#undef SHARKSSL_USE_SHA_256
265
#define SHARKSSL_USE_SHA_256 1
266
267
270
#ifndef SHARKSSL_ENABLE_SELECT_CIPHERSUITE
271
#define SHARKSSL_ENABLE_SELECT_CIPHERSUITE 1
272
#endif
273
274
279
#ifndef SHARKSSL_SELECT_CIPHERSUITE_LIST_DEPTH
280
#define SHARKSSL_SELECT_CIPHERSUITE_LIST_DEPTH 8
281
#endif
282
283
286
#ifndef SHARKSSL_ENABLE_ALPN_EXTENSION
287
#define SHARKSSL_ENABLE_ALPN_EXTENSION 1
288
#endif
289
290
295
#ifndef SHARKSSL_ENABLE_RSA_API
296
#define SHARKSSL_ENABLE_RSA_API 1
297
#endif
298
299
304
#ifndef SHARKSSL_ENABLE_RSA_PKCS1
305
#define SHARKSSL_ENABLE_RSA_PKCS1 1
306
#endif
307
308
316
#ifndef SHARKSSL_ENABLE_RSASSA_PSS
317
#define SHARKSSL_ENABLE_RSASSA_PSS 1
318
#endif
319
320
324
#ifndef SHARKSSL_ENABLE_RSA_OAEP
325
#define SHARKSSL_ENABLE_RSA_OAEP 0
326
#endif
327
328
332
#ifndef SHARKSSL_ENABLE_ECDSA_API
333
#define SHARKSSL_ENABLE_ECDSA_API 1
334
#endif
335
336
343
#ifndef SHARKSSL_ECDSA_ONLY_VERIFY
344
#define SHARKSSL_ECDSA_ONLY_VERIFY 0
345
#endif
346
347
354
#ifndef SHARKSSL_ENABLE_PEM_API
355
#define SHARKSSL_ENABLE_PEM_API 1
356
#endif
357
358
363
#ifndef SHARKSSL_ENABLE_ENCRYPTED_PKCS8_SUPPORT
364
#define SHARKSSL_ENABLE_ENCRYPTED_PKCS8_SUPPORT 0
365
#endif
366
367
370
#ifndef SHARKSSL_ENABLE_INFO_API
371
#define SHARKSSL_ENABLE_INFO_API 1
372
#endif
373
374
377
#ifndef SHARKSSL_ENABLE_CERT_CHAIN
378
#define SHARKSSL_ENABLE_CERT_CHAIN 1
379
#endif
380
381
385
#ifndef SHARKSSL_ENABLE_CA_LIST
386
#define SHARKSSL_ENABLE_CA_LIST 1
387
#endif
388
389
392
#ifndef SHARKSSL_ENABLE_CERTSTORE_API
393
#define SHARKSSL_ENABLE_CERTSTORE_API 1
394
#endif
395
396
399
#ifdef SHARKSSL_ENABLE_CLONE_CERTINFO
400
#if !SHARKSSL_ENABLE_CLONE_CERTINFO
401
#error SHARKSSL_ENABLE_CLONE_CERTINFO is now enabled by default - please remove its #define
402
#endif
403
#endif
404
405
409
#ifndef SHARKSSL_ENABLE_CERT_KEYUSAGE
410
#define SHARKSSL_ENABLE_CERT_KEYUSAGE 0
411
#endif
412
413
420
#ifndef SHARKSSL_MD5_SMALL_FOOTPRINT
421
#define SHARKSSL_MD5_SMALL_FOOTPRINT 0
422
#endif
423
424
#ifndef SHARKSSL_SHA1_SMALL_FOOTPRINT
425
#define SHARKSSL_SHA1_SMALL_FOOTPRINT 0
426
#endif
427
430
#ifndef SHARKSSL_SHA256_SMALL_FOOTPRINT
431
#define SHARKSSL_SHA256_SMALL_FOOTPRINT 0
432
#endif
433
434
437
#ifndef SHARKSSL_BIGINT_EXP_SLIDING_WINDOW_K
438
#define SHARKSSL_BIGINT_EXP_SLIDING_WINDOW_K 4
439
#endif
440
441
444
#ifndef SHARKSSL_BIGINT_MULT_LOOP_UNROLL
445
#define SHARKSSL_BIGINT_MULT_LOOP_UNROLL 1
446
#endif
447
448
451
#ifndef SHARKSSL_ENABLE_AES_CTR_MODE
452
#define SHARKSSL_ENABLE_AES_CTR_MODE 1
453
#endif
454
455
458
#ifndef SHARKSSL_AES_CIPHER_LOOP_UNROLL
459
#define SHARKSSL_AES_CIPHER_LOOP_UNROLL 1
460
#endif
461
462
466
#ifndef SHARKSSL_UNALIGNED_ACCESS
467
#ifdef UNALIGNED_ACCESS
468
#define SHARKSSL_UNALIGNED_ACCESS 1
469
#else
470
#define SHARKSSL_UNALIGNED_ACCESS 0
471
#endif
472
#endif
473
474
477
#ifndef SHARKSSL_BIGINT_WORDSIZE
478
#define SHARKSSL_BIGINT_WORDSIZE 32
479
#endif
480
481
484
#ifndef SHARKSSL_USE_ECC
485
#define SHARKSSL_USE_ECC 1
486
#endif
487
488
492
#ifndef SHARKSSL_ENABLE_ECDSA
493
#define SHARKSSL_ENABLE_ECDSA 1
494
#endif
495
496
502
#ifndef SHARKSSL_ECC_VERIFY_POINT
503
#define SHARKSSL_ECC_VERIFY_POINT 1
504
#endif
505
506
510
#ifndef SHARKSSL_ENABLE_EDDSA
511
#define SHARKSSL_ENABLE_EDDSA 1
512
#endif
513
514
518
#ifndef SHARKSSL_ECC_TIMING_RESISTANT
519
#define SHARKSSL_ECC_TIMING_RESISTANT 1
520
#endif
521
522
527
#ifndef SHARKSSL_BIGINT_TIMING_RESISTANT
528
#define SHARKSSL_BIGINT_TIMING_RESISTANT 1
529
#endif
530
531
534
#ifndef SHARKSSL_ECC_USE_SECP256R1
535
#define SHARKSSL_ECC_USE_SECP256R1 1
536
#endif
537
540
#ifndef SHARKSSL_ECC_USE_SECP384R1
541
#define SHARKSSL_ECC_USE_SECP384R1 1
542
#endif
543
546
#ifndef SHARKSSL_ECC_USE_SECP521R1
547
#define SHARKSSL_ECC_USE_SECP521R1 1
548
#endif
549
550
553
#ifndef SHARKSSL_ECC_USE_BRAINPOOLP256R1
554
#define SHARKSSL_ECC_USE_BRAINPOOLP256R1 1
555
#endif
556
559
#ifndef SHARKSSL_ECC_USE_BRAINPOOLP384R1
560
#define SHARKSSL_ECC_USE_BRAINPOOLP384R1 1
561
#endif
562
565
#ifndef SHARKSSL_ECC_USE_BRAINPOOLP512R1
566
#define SHARKSSL_ECC_USE_BRAINPOOLP512R1 1
567
#endif
568
569
572
#ifndef SHARKSSL_ECC_USE_CURVE25519
573
#define SHARKSSL_ECC_USE_CURVE25519 1
574
#endif
575
576
580
#ifndef SHARKSSL_ENABLE_X25519_API
581
#define SHARKSSL_ENABLE_X25519_API 1
582
#endif
583
584
587
#ifndef SHARKSSL_ECC_USE_CURVE448
588
#define SHARKSSL_ECC_USE_CURVE448 0
589
#endif
590
591
596
#ifndef SHARKSSL_ENABLE_ECDHE_RSA
597
#define SHARKSSL_ENABLE_ECDHE_RSA 1
598
#endif
599
600
605
#ifndef SHARKSSL_ENABLE_ECDHE_ECDSA
606
#define SHARKSSL_ENABLE_ECDHE_ECDSA 1
607
#endif
608
609
612
#ifndef SHARKSSL_OPTIMIZED_BIGINT_ASM
613
#define SHARKSSL_OPTIMIZED_BIGINT_ASM 0
614
#endif
615
618
#ifndef SHARKSSL_OPTIMIZED_CHACHA_ASM
619
#define SHARKSSL_OPTIMIZED_CHACHA_ASM 0
620
#endif
621
624
#ifndef SHARKSSL_OPTIMIZED_POLY1305_ASM
625
#define SHARKSSL_OPTIMIZED_POLY1305_ASM 0
626
#endif
627
628
635
#ifndef SHARKSSL_USE_RNG_TINYMT
636
#define SHARKSSL_USE_RNG_TINYMT 0
637
#endif
638
646
#ifndef SHARKSSL_USE_RNG_FORTUNA
647
#define SHARKSSL_USE_RNG_FORTUNA 0
648
#endif
649
650
656
#ifndef SHARKSSL_RNG_MULTITHREADED
657
#define SHARKSSL_RNG_MULTITHREADED 1
658
#endif
659
660
663
#ifndef SHARKSSL_NOPACK
664
#define SHARKSSL_NOPACK 0
665
#endif
666
672
#ifdef __DOXYGEN__
673
#define SHARKSSL_CHECK_DATE 0
674
#endif
675
#ifndef SHARKSSL_CHECK_DATE
676
#ifdef SHARKSSL_BA
/* if SharkSSL embedded in BAS */
677
#define SHARKSSL_CHECK_DATE 1
678
#else
679
#define SHARKSSL_CHECK_DATE 0
680
#endif
681
#endif
682
683
/* end group SharkSslCfg */
685
688
#if SHARKSSL_ECC_TIMING_RESISTANT
689
#undef SHARKSSL_BIGINT_TIMING_RESISTANT
690
#define SHARKSSL_BIGINT_TIMING_RESISTANT 1
691
#endif
692
695
#if SHARKSSL_TLS_1_3
696
#if SHARKSSL_ENABLE_RSA
697
#undef SHARKSSL_ENABLE_RSASSA_PSS
698
#define SHARKSSL_ENABLE_RSASSA_PSS 1
699
#endif
700
#if !SHARKSSL_TLS_1_2
701
#if SHARKSSL_ENABLE_SECURE_RENEGOTIATION
702
#undef SHARKSSL_ENABLE_SECURE_RENEGOTIATION
703
#define SHARKSSL_ENABLE_SECURE_RENEGOTIATION 0
704
#endif
705
#if SHARKSSL_ENABLE_DHE_RSA
706
#undef SHARKSSL_ENABLE_DHE_RSA
707
#define SHARKSSL_ENABLE_DHE_RSA 0
708
#endif
709
#endif
710
#if (0 == SHARKSSL_ECC_USE_SECP256R1)
711
#error TLS 1.3 requires NIST curve secp256r1
712
#endif
713
#if (0 == SHARKSSL_USE_AES_128)
714
#error TLS 1.3 requires AES 128
715
#endif
716
#if (0 == SHARKSSL_USE_SHA_256)
717
#error TLS 1.3 requires SHA 256
718
#endif
719
#endif
/* SHARKSSL_TLS_1_3 */
720
721
#endif
inc
SharkSSL_cfg.h
SharkSSL
documentation generated on Wed Aug 26 2026 13:41:31. Copyright Real Time Logic LLC.