initial commit; it works
[psslcertgen.git] / src / libpolarssl / config.h
blobe476a0187621f1fb30437b8e04413e0f3cf4183e
1 /**
2 * \file config.h
4 * \brief Configuration options (set of defines)
6 * Copyright (C) 2006-2013, Brainspark B.V.
8 * This file is part of PolarSSL (http://www.polarssl.org)
9 * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
11 * All rights reserved.
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * This set of compile-time options may be used to enable
28 * or disable features selectively, and reduce the global
29 * memory footprint.
31 #ifndef POLARSSL_CONFIG_H
32 #define POLARSSL_CONFIG_H
34 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
35 #define _CRT_SECURE_NO_DEPRECATE 1
36 #endif
38 /**
39 * \name SECTION: System support
41 * This section sets system specific settings.
42 * \{
45 /**
46 * \def POLARSSL_HAVE_INT8
48 * The system uses 8-bit wide native integers.
50 * Uncomment if native integers are 8-bit wide.
51 #define POLARSSL_HAVE_INT8
54 /**
55 * \def POLARSSL_HAVE_INT16
57 * The system uses 16-bit wide native integers.
59 * Uncomment if native integers are 16-bit wide.
60 #define POLARSSL_HAVE_INT16
63 /**
64 * \def POLARSSL_HAVE_LONGLONG
66 * The compiler supports the 'long long' type.
67 * (Only used on 32-bit platforms)
69 #define POLARSSL_HAVE_LONGLONG
71 /**
72 * \def POLARSSL_HAVE_ASM
74 * The compiler has support for asm()
76 * Uncomment to enable the use of assembly code.
78 * Requires support for asm() in compiler.
80 * Used in:
81 * library/timing.c
82 * library/padlock.c
83 * include/polarssl/bn_mul.h
86 #define POLARSSL_HAVE_ASM
88 /**
89 * \def POLARSSL_HAVE_SSE2
91 * CPU supports SSE2 instruction set.
93 * Uncomment if the CPU supports SSE2 (IA-32 specific).
96 #define POLARSSL_HAVE_SSE2
97 /* \} name */
99 /**
100 * \name SECTION: PolarSSL feature support
102 * This section sets support for features that are or are not needed
103 * within the modules that are enabled.
104 * \{
108 * \def POLARSSL_XXX_ALT
110 * Uncomment a macro to let PolarSSL use your alternate core implementation of
111 * a symmetric or hash algorithm (e.g. platform specific assembly optimized
112 * implementations). Keep in mind that the function prototypes should remain
113 * the same.
115 * Example: In case you uncomment POLARSSL_AES_ALT, PolarSSL will no longer
116 * provide the "struct aes_context" definition and omit the base function
117 * declarations and implementations. "aes_alt.h" will be included from
118 * "aes.h" to include the new function definitions.
120 * Uncomment a macro to enable alternate implementation for core algorithm
121 * functions
122 #define POLARSSL_AES_ALT
123 #define POLARSSL_ARC4_ALT
124 #define POLARSSL_BLOWFISH_ALT
125 #define POLARSSL_CAMELLIA_ALT
126 #define POLARSSL_DES_ALT
127 #define POLARSSL_XTEA_ALT
128 #define POLARSSL_MD2_ALT
129 #define POLARSSL_MD4_ALT
130 #define POLARSSL_MD5_ALT
131 #define POLARSSL_SHA1_ALT
132 #define POLARSSL_SHA2_ALT
133 #define POLARSSL_SHA4_ALT
137 * \def POLARSSL_AES_ROM_TABLES
139 * Store the AES tables in ROM.
141 * Uncomment this macro to store the AES tables in ROM.
143 #define POLARSSL_AES_ROM_TABLES
147 * \def POLARSSL_CIPHER_MODE_CFB
149 * Enable Cipher Feedback mode (CFB) for symmetric ciphers.
151 #define POLARSSL_CIPHER_MODE_CFB
154 * \def POLARSSL_CIPHER_MODE_CTR
156 * Enable Counter Block Cipher mode (CTR) for symmetric ciphers.
158 #define POLARSSL_CIPHER_MODE_CTR
161 * \def POLARSSL_CIPHER_NULL_CIPHER
163 * Enable NULL cipher.
164 * Warning: Only do so when you know what you are doing. This allows for
165 * encryption or channels without any security!
167 * Requires POLARSSL_ENABLE_WEAK_CIPHERSUITES as well to enable
168 * the following ciphersuites:
169 * TLS_RSA_WITH_NULL_MD5
170 * TLS_RSA_WITH_NULL_SHA
171 * TLS_RSA_WITH_NULL_SHA256
173 * Uncomment this macro to enable the NULL cipher and ciphersuites
174 #define POLARSSL_CIPHER_NULL_CIPHER
178 * \def POLARSSL_ENABLE_WEAK_CIPHERSUITES
180 * Enable weak ciphersuites in SSL / TLS
181 * Warning: Only do so when you know what you are doing. This allows for
182 * channels with virtually no security at all!
184 * This enables the following ciphersuites:
185 * TLS_RSA_WITH_DES_CBC_SHA
186 * TLS_DHE_RSA_WITH_DES_CBC_SHA
188 * Uncomment this macro to enable weak ciphersuites
190 #define POLARSSL_ENABLE_WEAK_CIPHERSUITES
193 * \def POLARSSL_ERROR_STRERROR_DUMMY
195 * Enable a dummy error function to make use of error_strerror() in
196 * third party libraries easier.
198 * Disable if you run into name conflicts and want to really remove the
199 * error_strerror()
201 #define POLARSSL_ERROR_STRERROR_DUMMY
204 * \def POLARSSL_GENPRIME
206 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
208 * Enable the RSA prime-number generation code.
210 #define POLARSSL_GENPRIME
213 * \def POLARSSL_FS_IO
215 * Enable functions that use the filesystem.
217 #define POLARSSL_FS_IO
220 * \def POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
222 * Do not add default entropy sources. These are the platform specific,
223 * hardclock and HAVEGE based poll functions.
225 * This is useful to have more control over the added entropy sources in an
226 * application.
228 * Uncomment this macro to prevent loading of default entropy functions.
229 #define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
233 * \def POLARSSL_NO_PLATFORM_ENTROPY
235 * Do not use built-in platform entropy functions.
236 * This is useful if your platform does not support
237 * standards like the /dev/urandom or Windows CryptoAPI.
239 * Uncomment this macro to disable the built-in platform entropy functions.
240 #define POLARSSL_NO_PLATFORM_ENTROPY
244 * \def POLARSSL_PKCS1_V21
246 * Requires: POLARSSL_MD_C, POLARSSL_RSA_C
248 * Enable support for PKCS#1 v2.1 encoding.
249 * This enables support for RSAES-OAEP and RSASSA-PSS operations.
251 #define POLARSSL_PKCS1_V21
254 * \def POLARSSL_RSA_NO_CRT
256 * Do not use the Chinese Remainder Theorem for the RSA private operation.
258 * Uncomment this macro to disable the use of CRT in RSA.
260 #define POLARSSL_RSA_NO_CRT
264 * \def POLARSSL_SELF_TEST
266 * Enable the checkup functions (*_self_test).
267 #define POLARSSL_SELF_TEST
271 * \def POLARSSL_SSL_ALL_ALERT_MESSAGES
273 * Enable sending of alert messages in case of encountered errors as per RFC.
274 * If you choose not to send the alert messages, PolarSSL can still communicate
275 * with other servers, only debugging of failures is harder.
277 * The advantage of not sending alert messages, is that no information is given
278 * about reasons for failures thus preventing adversaries of gaining intel.
280 * Enable sending of all alert messages
281 #define POLARSSL_SSL_ALERT_MESSAGES
285 * \def POLARSSL_SSL_DEBUG_ALL
287 * Enable the debug messages in SSL module for all issues.
288 * Debug messages have been disabled in some places to prevent timing
289 * attacks due to (unbalanced) debugging function calls.
291 * If you need all error reporting you should enable this during debugging,
292 * but remove this for production servers that should log as well.
294 * Uncomment this macro to report all debug messages on errors introducing
295 * a timing side-channel.
297 #define POLARSSL_SSL_DEBUG_ALL
301 * \def POLARSSL_SSL_HW_RECORD_ACCEL
303 * Enable hooking functions in SSL module for hardware acceleration of
304 * individual records.
306 * Uncomment this macro to enable hooking functions.
307 #define POLARSSL_SSL_HW_RECORD_ACCEL
311 * \def POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
313 * Enable support for receiving and parsing SSLv2 Client Hello messages for the
314 * SSL Server module (POLARSSL_SSL_SRV_C)
316 * Comment this macro to disable support for SSLv2 Client Hello messages.
318 #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
321 * \def POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
323 * If set, the X509 parser will not break-off when parsing an X509 certificate
324 * and encountering an unknown critical extension.
326 * Uncomment to prevent an error.
329 #define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
332 * \def POLARSSL_ZLIB_SUPPORT
334 * If set, the SSL/TLS module uses ZLIB to support compression and
335 * decompression of packet data.
337 * Used in: library/ssl_tls.c
338 * library/ssl_cli.c
339 * library/ssl_srv.c
341 * This feature requires zlib library and headers to be present.
343 * Uncomment to enable use of ZLIB
345 #define POLARSSL_ZLIB_SUPPORT
346 /* \} name */
349 * \name SECTION: PolarSSL modules
351 * This section enables or disables entire modules in PolarSSL
352 * \{
356 * \def POLARSSL_AES_C
358 * Enable the AES block cipher.
360 * Module: library/aes.c
361 * Caller: library/ssl_tls.c
362 * library/pem.c
363 * library/ctr_drbg.c
365 * This module enables the following ciphersuites (if other requisites are
366 * enabled as well):
367 * TLS_RSA_WITH_AES_128_CBC_SHA
368 * TLS_RSA_WITH_AES_256_CBC_SHA
369 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
370 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
371 * TLS_RSA_WITH_AES_128_CBC_SHA256
372 * TLS_RSA_WITH_AES_256_CBC_SHA256
373 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
374 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
375 * TLS_RSA_WITH_AES_128_GCM_SHA256
376 * TLS_RSA_WITH_AES_256_GCM_SHA384
378 * PEM uses AES for decrypting encrypted keys.
380 #define POLARSSL_AES_C
383 * \def POLARSSL_ARC4_C
385 * Enable the ARCFOUR stream cipher.
387 * Module: library/arc4.c
388 * Caller: library/ssl_tls.c
390 * This module enables the following ciphersuites:
391 * TLS_RSA_WITH_RC4_128_MD5
392 * TLS_RSA_WITH_RC4_128_SHA
394 #define POLARSSL_ARC4_C
397 * \def POLARSSL_ASN1_PARSE_C
399 * Enable the generic ASN1 parser.
401 * Module: library/asn1.c
402 * Caller: library/x509parse.c
404 #define POLARSSL_ASN1_PARSE_C
407 * \def POLARSSL_ASN1_WRITE_C
409 * Enable the generic ASN1 writer.
411 * Module: library/asn1write.c
413 #define POLARSSL_ASN1_WRITE_C
416 * \def POLARSSL_BASE64_C
418 * Enable the Base64 module.
420 * Module: library/base64.c
421 * Caller: library/pem.c
423 * This module is required for PEM support (required by X.509).
425 #define POLARSSL_BASE64_C
428 * \def POLARSSL_BIGNUM_C
430 * Enable the multi-precision integer library.
432 * Module: library/bignum.c
433 * Caller: library/dhm.c
434 * library/rsa.c
435 * library/ssl_tls.c
436 * library/x509parse.c
438 * This module is required for RSA and DHM support.
440 #define POLARSSL_BIGNUM_C
443 * \def POLARSSL_BLOWFISH_C
445 * Enable the Blowfish block cipher.
447 * Module: library/blowfish.c
449 #define POLARSSL_BLOWFISH_C
452 * \def POLARSSL_CAMELLIA_C
454 * Enable the Camellia block cipher.
456 * Module: library/camellia.c
457 * Caller: library/ssl_tls.c
459 * This module enables the following ciphersuites (if other requisites are
460 * enabled as well):
461 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA
462 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA
463 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
464 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
465 * TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256
466 * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
467 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
468 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
470 #define POLARSSL_CAMELLIA_C
473 * \def POLARSSL_CERTS_C
475 * Enable the test certificates.
477 * Module: library/certs.c
478 * Caller:
480 * This module is used for testing (ssl_client/server).
482 #define POLARSSL_CERTS_C
485 * \def POLARSSL_CIPHER_C
487 * Enable the generic cipher layer.
489 * Module: library/cipher.c
490 * Caller:
492 * Uncomment to enable generic cipher wrappers.
494 #define POLARSSL_CIPHER_C
497 * \def POLARSSL_CTR_DRBG_C
499 * Enable the CTR_DRBG AES-256-based random generator
501 * Module: library/ctr_drbg.c
502 * Caller:
504 * Requires: POLARSSL_AES_C
506 * This module provides the CTR_DRBG AES-256 random number generator.
508 #define POLARSSL_CTR_DRBG_C
511 * \def POLARSSL_DEBUG_C
513 * Enable the debug functions.
515 * Module: library/debug.c
516 * Caller: library/ssl_cli.c
517 * library/ssl_srv.c
518 * library/ssl_tls.c
520 * This module provides debugging functions.
521 #define POLARSSL_DEBUG_C
525 * \def POLARSSL_DES_C
527 * Enable the DES block cipher.
529 * Module: library/des.c
530 * Caller: library/pem.c
531 * library/ssl_tls.c
533 * This module enables the following ciphersuites (if other requisites are
534 * enabled as well):
535 * TLS_RSA_WITH_3DES_EDE_CBC_SHA
536 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
538 * PEM uses DES/3DES for decrypting encrypted keys.
540 #define POLARSSL_DES_C
543 * \def POLARSSL_DHM_C
545 * Enable the Diffie-Hellman-Merkle key exchange.
547 * Module: library/dhm.c
548 * Caller: library/ssl_cli.c
549 * library/ssl_srv.c
551 * This module enables the following ciphersuites (if other requisites are
552 * enabled as well):
553 * TLS_DHE_RSA_WITH_DES_CBC_SHA
554 * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
555 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA
556 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA
557 * TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
558 * TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
559 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA
560 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA
561 * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
562 * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
563 * TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
564 * TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
566 #define POLARSSL_DHM_C
569 * \def POLARSSL_ENTROPY_C
571 * Enable the platform-specific entropy code.
573 * Module: library/entropy.c
574 * Caller:
576 * Requires: POLARSSL_SHA4_C
578 * This module provides a generic entropy pool
580 #define POLARSSL_ENTROPY_C
583 * \def POLARSSL_ERROR_C
585 * Enable error code to error string conversion.
587 * Module: library/error.c
588 * Caller:
590 * This module enables err_strerror().
592 #define POLARSSL_ERROR_C
595 * \def POLARSSL_GCM_C
597 * Enable the Galois/Counter Mode (GCM) for AES
599 * Module: library/gcm.c
601 * Requires: POLARSSL_AES_C
603 * This module enables the following ciphersuites (if other requisites are
604 * enabled as well):
605 * TLS_RSA_WITH_AES_128_GCM_SHA256
606 * TLS_RSA_WITH_AES_256_GCM_SHA384
608 #define POLARSSL_GCM_C
611 * \def POLARSSL_HAVEGE_C
613 * Enable the HAVEGE random generator.
615 * Warning: the HAVEGE random generator is not suitable for virtualized
616 * environments
618 * Warning: the HAVEGE random generator is dependent on timing and specific
619 * processor traits. It is therefore not advised to use HAVEGE as
620 * your applications primary random generator or primary entropy pool
621 * input. As a secondary input to your entropy pool, it IS able add
622 * the (limited) extra entropy it provides.
624 * Module: library/havege.c
625 * Caller:
627 * Requires: POLARSSL_TIMING_C
629 * Uncomment to enable the HAVEGE random generator.
631 #define POLARSSL_HAVEGE_C
634 * \def POLARSSL_MD_C
636 * Enable the generic message digest layer.
638 * Module: library/md.c
639 * Caller:
641 * Uncomment to enable generic message digest wrappers.
643 #define POLARSSL_MD_C
646 * \def POLARSSL_MD2_C
648 * Enable the MD2 hash algorithm
650 * Module: library/md2.c
651 * Caller: library/x509parse.c
653 * Uncomment to enable support for (rare) MD2-signed X.509 certs.
656 #define POLARSSL_MD2_C
659 * \def POLARSSL_MD4_C
661 * Enable the MD4 hash algorithm
663 * Module: library/md4.c
664 * Caller: library/x509parse.c
666 * Uncomment to enable support for (rare) MD4-signed X.509 certs.
669 #define POLARSSL_MD4_C
672 * \def POLARSSL_MD5_C
674 * Enable the MD5 hash algorithm
676 * Module: library/md5.c
677 * Caller: library/pem.c
678 * library/ssl_tls.c
679 * library/x509parse.c
681 * This module is required for SSL/TLS and X.509.
682 * PEM uses MD5 for decrypting encrypted keys.
684 #define POLARSSL_MD5_C
687 * \def POLARSSL_NET_C
689 * Enable the TCP/IP networking routines.
691 * Module: library/net.c
692 * Caller:
694 * This module provides TCP/IP networking routines.
696 #define POLARSSL_NET_C
699 * \def POLARSSL_PADLOCK_C
701 * Enable VIA Padlock support on x86.
703 * Module: library/padlock.c
704 * Caller: library/aes.c
706 * This modules adds support for the VIA PadLock on x86.
707 #define POLARSSL_PADLOCK_C
711 * \def POLARSSL_PBKDF2_C
713 * Enable PKCS#5 PBKDF2 key derivation function
714 * DEPRECATED: Use POLARSSL_PKCS5_C instead
716 * Module: library/pbkdf2.c
718 * Requires: POLARSSL_PKCS5_C
720 * This module adds support for the PKCS#5 PBKDF2 key derivation function.
722 #define POLARSSL_PBKDF2_C
725 * \def POLARSSL_PEM_C
727 * Enable PEM decoding
729 * Module: library/pem.c
730 * Caller: library/x509parse.c
732 * Requires: POLARSSL_BASE64_C
734 * This modules adds support for decoding PEM files.
736 #define POLARSSL_PEM_C
739 * \def POLARSSL_PKCS5_C
741 * Enable PKCS#5 functions
743 * Module: library/pkcs5.c
745 * Requires: POLARSSL_MD_C
747 * This module adds support for the PKCS#5 functions.
749 #define POLARSSL_PKCS5_C
752 * \def POLARSSL_PKCS11_C
754 * Enable wrapper for PKCS#11 smartcard support.
756 * Module: library/ssl_srv.c
757 * Caller: library/ssl_cli.c
758 * library/ssl_srv.c
760 * Requires: POLARSSL_SSL_TLS_C
762 * This module enables SSL/TLS PKCS #11 smartcard support.
763 * Requires the presence of the PKCS#11 helper library (libpkcs11-helper)
764 #define POLARSSL_PKCS11_C
768 * \def POLARSSL_PKCS12_C
770 * Enable PKCS#12 PBE functions
771 * Adds algorithms for parsing PKCS#8 encrypted private keys
773 * Module: library/pkcs12.c
774 * Caller: library/x509parse.c
776 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_CIPHER_C, POLARSSL_MD_C
777 * Can use: POLARSSL_ARC4_C
779 * This module enables PKCS#12 functions.
781 #define POLARSSL_PKCS12_C
784 * \def POLARSSL_RSA_C
786 * Enable the RSA public-key cryptosystem.
788 * Module: library/rsa.c
789 * Caller: library/ssl_cli.c
790 * library/ssl_srv.c
791 * library/ssl_tls.c
792 * library/x509.c
794 * Requires: POLARSSL_BIGNUM_C
796 * This module is required for SSL/TLS and MD5-signed certificates.
798 #define POLARSSL_RSA_C
801 * \def POLARSSL_SHA1_C
803 * Enable the SHA1 cryptographic hash algorithm.
805 * Module: library/sha1.c
806 * Caller: library/ssl_cli.c
807 * library/ssl_srv.c
808 * library/ssl_tls.c
809 * library/x509parse.c
811 * This module is required for SSL/TLS and SHA1-signed certificates.
813 #define POLARSSL_SHA1_C
816 * \def POLARSSL_SHA2_C
818 * Enable the SHA-224 and SHA-256 cryptographic hash algorithms.
820 * Module: library/sha2.c
821 * Caller: library/md_wrap.c
822 * library/x509parse.c
824 * This module adds support for SHA-224 and SHA-256.
825 * This module is required for the SSL/TLS 1.2 PRF function.
827 #define POLARSSL_SHA2_C
830 * \def POLARSSL_SHA4_C
832 * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
834 * Module: library/sha4.c
835 * Caller: library/md_wrap.c
836 * library/x509parse.c
838 * This module adds support for SHA-384 and SHA-512.
840 #define POLARSSL_SHA4_C
843 * \def POLARSSL_SSL_CACHE_C
845 * Enable simple SSL cache implementation.
847 * Module: library/ssl_cache.c
848 * Caller:
850 * Requires: POLARSSL_SSL_CACHE_C
851 #define POLARSSL_SSL_CACHE_C
855 * \def POLARSSL_SSL_CLI_C
857 * Enable the SSL/TLS client code.
859 * Module: library/ssl_cli.c
860 * Caller:
862 * Requires: POLARSSL_SSL_TLS_C
864 * This module is required for SSL/TLS client support.
866 #define POLARSSL_SSL_CLI_C
869 * \def POLARSSL_SSL_SRV_C
871 * Enable the SSL/TLS server code.
873 * Module: library/ssl_srv.c
874 * Caller:
876 * Requires: POLARSSL_SSL_TLS_C
878 * This module is required for SSL/TLS server support.
880 #define POLARSSL_SSL_SRV_C
883 * \def POLARSSL_SSL_TLS_C
885 * Enable the generic SSL/TLS code.
887 * Module: library/ssl_tls.c
888 * Caller: library/ssl_cli.c
889 * library/ssl_srv.c
891 * Requires: POLARSSL_MD5_C, POLARSSL_SHA1_C, POLARSSL_X509_PARSE_C
893 * This module is required for SSL/TLS.
895 #define POLARSSL_SSL_TLS_C
898 * \def POLARSSL_TIMING_C
900 * Enable the portable timing interface.
902 * Module: library/timing.c
903 * Caller: library/havege.c
905 * This module is used by the HAVEGE random number generator.
907 #define POLARSSL_TIMING_C
910 * \def POLARSSL_VERSION_C
912 * Enable run-time version information.
914 * Module: library/version.c
916 * This module provides run-time version information.
918 #define POLARSSL_VERSION_C
921 * \def POLARSSL_X509_PARSE_C
923 * Enable X.509 certificate parsing.
925 * Module: library/x509parse.c
926 * Caller: library/ssl_cli.c
927 * library/ssl_srv.c
928 * library/ssl_tls.c
930 * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_RSA_C
932 * This module is required for X.509 certificate parsing.
934 #define POLARSSL_X509_PARSE_C
937 * \def POLARSSL_X509_WRITE_C
939 * Enable X.509 buffer writing.
941 * Module: library/x509write.c
943 * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
945 * This module is required for X.509 certificate request writing.
947 #define POLARSSL_X509_WRITE_C
950 * \def POLARSSL_XTEA_C
952 * Enable the XTEA block cipher.
954 * Module: library/xtea.c
955 * Caller:
957 #define POLARSSL_XTEA_C
958 /* \} name */
961 * \name SECTION: Module configuration options
963 * This section allows for the setting of module specific sizes and
964 * configuration options. The default values are already present in the
965 * relevant header files and should suffice for the regular use cases.
966 * Our advice is to enable POLARSSL_CONFIG_OPTIONS and change values here
967 * only if you have a good reason and know the consequences.
969 * If POLARSSL_CONFIG_OPTIONS is undefined here the options in the module
970 * header file take precedence.
972 * Please check the respective header file for documentation on these
973 * parameters (to prevent duplicate documentation).
975 * Uncomment POLARSSL_CONFIG_OPTIONS to enable using the values defined here.
976 * \{
978 //#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
980 #if defined(POLARSSL_CONFIG_OPTIONS)
982 // MPI / BIGNUM options
984 #define POLARSSL_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
985 #define POLARSSL_MPI_MAX_SIZE 512 /**< Maximum number of bytes for usable MPIs. */
987 // CTR_DRBG options
989 #define CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default */
990 #define CTR_DRBG_RESEED_INTERVAL 10000 /**< Interval before reseed is performed by default */
991 #define CTR_DRBG_MAX_INPUT 256 /**< Maximum number of additional input bytes */
992 #define CTR_DRBG_MAX_REQUEST 1024 /**< Maximum number of requested bytes per call */
993 #define CTR_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */
995 // Entropy options
997 #define ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */
998 #define ENTROPY_MAX_GATHER 128 /**< Maximum amount requested from entropy sources */
1000 // SSL Cache options
1002 #define SSL_CACHE_DEFAULT_TIMEOUT 86400 /**< 1 day */
1003 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50 /**< Maximum entries in cache */
1005 // SSL options
1007 #define SSL_MAX_CONTENT_LEN 16384 /**< Size of the input / output buffer */
1009 #endif /* POLARSSL_CONFIG_OPTIONS */
1011 /* \} name */
1012 #endif /* config.h */