PolarSSL v1.3.3
config.h
Go to the documentation of this file.
1 
31 #ifndef POLARSSL_CONFIG_H
32 #define POLARSSL_CONFIG_H
33 
34 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
35 #define _CRT_SECURE_NO_DEPRECATE 1
36 #endif
37 
52 //#define POLARSSL_HAVE_INT8
53 
61 //#define POLARSSL_HAVE_INT16
62 
69 #define POLARSSL_HAVE_LONGLONG
70 
85 #define POLARSSL_HAVE_ASM
86 
94 //#define POLARSSL_HAVE_SSE2
95 
103 #define POLARSSL_HAVE_TIME
104 
115 #define POLARSSL_HAVE_IPV6
116 /* \} name SECTION: System support */
117 
142 //#define POLARSSL_AES_ALT
143 //#define POLARSSL_ARC4_ALT
144 //#define POLARSSL_BLOWFISH_ALT
145 //#define POLARSSL_CAMELLIA_ALT
146 //#define POLARSSL_DES_ALT
147 //#define POLARSSL_XTEA_ALT
148 //#define POLARSSL_MD2_ALT
149 //#define POLARSSL_MD4_ALT
150 //#define POLARSSL_MD5_ALT
151 //#define POLARSSL_SHA1_ALT
152 //#define POLARSSL_SHA256_ALT
153 //#define POLARSSL_SHA512_ALT
154 
163 //#define POLARSSL_AES_ROM_TABLES
164 
170 #define POLARSSL_CIPHER_MODE_CBC
171 
177 #define POLARSSL_CIPHER_MODE_CFB
178 
184 #define POLARSSL_CIPHER_MODE_CTR
185 
229 #define POLARSSL_CIPHER_PADDING_PKCS7
230 #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
231 #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
232 #define POLARSSL_CIPHER_PADDING_ZEROS
233 
257 #define POLARSSL_ECP_DP_SECP192R1_ENABLED
258 #define POLARSSL_ECP_DP_SECP224R1_ENABLED
259 #define POLARSSL_ECP_DP_SECP256R1_ENABLED
260 #define POLARSSL_ECP_DP_SECP384R1_ENABLED
261 #define POLARSSL_ECP_DP_SECP521R1_ENABLED
262 #define POLARSSL_ECP_DP_BP256R1_ENABLED
263 #define POLARSSL_ECP_DP_BP384R1_ENABLED
264 #define POLARSSL_ECP_DP_BP512R1_ENABLED
265 //#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
266 #define POLARSSL_ECP_DP_M255_ENABLED
267 //#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
268 //#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
269 
279 #define POLARSSL_ECP_NIST_OPTIM
280 
301 #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
302 
325 #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
326 
345 #define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
346 
370 #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
371 
398 #define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
399 
424 #define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
425 
449 #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
450 
473 #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
474 
497 #define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
498 
521 #define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
522 
532 #define POLARSSL_ERROR_STRERROR_BC
533 
543 #define POLARSSL_ERROR_STRERROR_DUMMY
544 
552 #define POLARSSL_GENPRIME
553 
559 #define POLARSSL_FS_IO
560 
572 //#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
573 
583 //#define POLARSSL_NO_PLATFORM_ENTROPY
584 
597 //#define POLARSSL_MEMORY_DEBUG
598 
609 //#define POLARSSL_MEMORY_BACKTRACE
610 
620 #define POLARSSL_PKCS1_V15
621 
631 #define POLARSSL_PKCS1_V21
632 
641 //#define POLARSSL_RSA_NO_CRT
642 
648 #define POLARSSL_SELF_TEST
649 
662 #define POLARSSL_SSL_ALERT_MESSAGES
663 
678 //#define POLARSSL_SSL_DEBUG_ALL
679 
688 //#define POLARSSL_SSL_HW_RECORD_ACCEL
689 
698 #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
699 
708 //#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
709 
717 #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
718 
729 #define POLARSSL_SSL_PROTO_SSL3
730 
741 #define POLARSSL_SSL_PROTO_TLS1
742 
753 #define POLARSSL_SSL_PROTO_TLS1_1
754 
765 #define POLARSSL_SSL_PROTO_TLS1_2
766 
778 #define POLARSSL_SSL_SESSION_TICKETS
779 
787 #define POLARSSL_SSL_SERVER_NAME_INDICATION
788 
796 #define POLARSSL_SSL_TRUNCATED_HMAC
797 
807 //#define POLARSSL_THREADING_ALT
808 
818 //#define POLARSSL_THREADING_PTHREAD
819 
828 //#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
829 
838 //#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
839 
854 //#define POLARSSL_ZLIB_SUPPORT
855 /* \} name SECTION: PolarSSL feature support */
856 
876 #define POLARSSL_AESNI_C
877 
951 #define POLARSSL_AES_C
952 
974 #define POLARSSL_ARC4_C
975 
988 #define POLARSSL_ASN1_PARSE_C
989 
1002 #define POLARSSL_ASN1_WRITE_C
1003 
1014 #define POLARSSL_BASE64_C
1015 
1029 #define POLARSSL_BIGNUM_C
1030 
1038 #define POLARSSL_BLOWFISH_C
1039 
1093 #define POLARSSL_CAMELLIA_C
1094 
1107 #define POLARSSL_CERTS_C
1108 
1119 #define POLARSSL_CIPHER_C
1120 
1133 #define POLARSSL_CTR_DRBG_C
1134 
1147 #define POLARSSL_DEBUG_C
1148 
1173 #define POLARSSL_DES_C
1174 
1187 #define POLARSSL_DHM_C
1188 
1203 #define POLARSSL_ECDH_C
1204 
1218 #define POLARSSL_ECDSA_C
1219 
1231 #define POLARSSL_ECP_C
1232 
1245 #define POLARSSL_ENTROPY_C
1246 
1257 #define POLARSSL_ERROR_C
1258 
1271 #define POLARSSL_GCM_C
1272 
1294 //#define POLARSSL_HAVEGE_C
1295 
1306 #define POLARSSL_MD_C
1307 
1318 //#define POLARSSL_MD2_C
1319 
1330 //#define POLARSSL_MD4_C
1331 
1345 #define POLARSSL_MD5_C
1346 
1359 //#define POLARSSL_MEMORY_C
1360 
1374 //#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1375 
1385 #define POLARSSL_NET_C
1386 
1408 #define POLARSSL_OID_C
1409 
1422 #define POLARSSL_PADLOCK_C
1423 
1436 #define POLARSSL_PBKDF2_C
1437 
1454 #define POLARSSL_PEM_PARSE_C
1455 
1470 #define POLARSSL_PEM_WRITE_C
1471 
1486 #define POLARSSL_PK_C
1487 
1501 #define POLARSSL_PK_PARSE_C
1502 
1515 #define POLARSSL_PK_WRITE_C
1516 
1528 #define POLARSSL_PKCS5_C
1529 
1543 //#define POLARSSL_PKCS11_C
1544 
1559 #define POLARSSL_PKCS12_C
1560 
1577 #define POLARSSL_RSA_C
1578 
1593 #define POLARSSL_SHA1_C
1594 
1611 #define POLARSSL_SHA256_C
1612 
1627 #define POLARSSL_SHA512_C
1628 
1639 #define POLARSSL_SSL_CACHE_C
1640 
1653 #define POLARSSL_SSL_CLI_C
1654 
1667 #define POLARSSL_SSL_SRV_C
1668 
1683 #define POLARSSL_SSL_TLS_C
1684 
1704 //#define POLARSSL_THREADING_C
1705 
1716 #define POLARSSL_TIMING_C
1717 
1727 #define POLARSSL_VERSION_C
1728 
1744 #define POLARSSL_X509_USE_C
1745 
1760 #define POLARSSL_X509_CRT_PARSE_C
1761 
1774 #define POLARSSL_X509_CRL_PARSE_C
1775 
1788 #define POLARSSL_X509_CSR_PARSE_C
1789 
1801 #define POLARSSL_X509_CREATE_C
1802 
1814 #define POLARSSL_X509_CRT_WRITE_C
1815 
1827 #define POLARSSL_X509_CSR_WRITE_C
1828 
1837 #define POLARSSL_XTEA_C
1838 
1839 /* \} name SECTION: PolarSSL modules */
1840 
1859 //#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1860 
1861 #if defined(POLARSSL_CONFIG_OPTIONS)
1862 
1863 // MPI / BIGNUM options
1864 //
1865 #define POLARSSL_MPI_WINDOW_SIZE 6
1866 #define POLARSSL_MPI_MAX_SIZE 512
1868 // CTR_DRBG options
1869 //
1870 #define CTR_DRBG_ENTROPY_LEN 48
1871 #define CTR_DRBG_RESEED_INTERVAL 10000
1872 #define CTR_DRBG_MAX_INPUT 256
1873 #define CTR_DRBG_MAX_REQUEST 1024
1874 #define CTR_DRBG_MAX_SEED_INPUT 384
1876 // ECP options
1877 //
1878 #define POLARSSL_ECP_MAX_BITS 521
1879 #define POLARSSL_ECP_WINDOW_SIZE 6
1880 #define POLARSSL_ECP_FIXED_POINT_OPTIM 1
1882 // Entropy options
1883 //
1884 #define ENTROPY_MAX_SOURCES 20
1885 #define ENTROPY_MAX_GATHER 128
1887 // Memory options
1888 #define MEMORY_ALIGN_MULTIPLE 4
1889 #define POLARSSL_MEMORY_STDMALLOC malloc
1890 #define POLARSSL_MEMORY_STDFREE free
1892 // SSL Cache options
1893 //
1894 #define SSL_CACHE_DEFAULT_TIMEOUT 86400
1895 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50
1897 // SSL options
1898 //
1899 #define SSL_MAX_CONTENT_LEN 16384
1900 #define SSL_DEFAULT_TICKET_LIFETIME 86400
1902 #endif /* POLARSSL_CONFIG_OPTIONS */
1903 
1904 /* \} name */
1905 
1906 /*
1907  * Sanity checks on defines and dependencies
1908  */
1909 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
1910 #error "POLARSSL_AESNI_C defined, but not all prerequisites"
1911 #endif
1912 
1913 #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1914 #error "POLARSSL_CERTS_C defined, but not all prerequisites"
1915 #endif
1916 
1917 #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1918 #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1919 #endif
1920 
1921 #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1922 #error "POLARSSL_DHM_C defined, but not all prerequisites"
1923 #endif
1924 
1925 #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1926 #error "POLARSSL_ECDH_C defined, but not all prerequisites"
1927 #endif
1928 
1929 #if defined(POLARSSL_ECDSA_C) && \
1930  ( !defined(POLARSSL_ECP_C) || \
1931  !defined(POLARSSL_ASN1_PARSE_C) || \
1932  !defined(POLARSSL_ASN1_WRITE_C) )
1933 #error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1934 #endif
1935 
1936 #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1937  !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1938  !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1939  !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1940  !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1941  !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1942  !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1943  !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1944  !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
1945 #error "POLARSSL_ECP_C defined, but not all prerequisites"
1946 #endif
1947 
1948 #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1949  !defined(POLARSSL_SHA256_C))
1950 #error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1951 #endif
1952 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1953  defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1954 #error "CTR_DRBG_ENTROPY_LEN value too high"
1955 #endif
1956 #if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1957  defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1958 #error "CTR_DRBG_ENTROPY_LEN value too high"
1959 #endif
1960 
1961 #if defined(POLARSSL_GCM_C) && ( \
1962  !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
1963 #error "POLARSSL_GCM_C defined, but not all prerequisites"
1964 #endif
1965 
1966 #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
1967 #error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
1968 #endif
1969 
1970 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
1971  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1972 #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
1973 #endif
1974 
1975 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
1976  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
1977 #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
1978 #endif
1979 
1980 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
1981 #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
1982 #endif
1983 
1984 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
1985  !defined(POLARSSL_ECDH_C)
1986 #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
1987 #endif
1988 
1989 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
1990  ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
1991  !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
1992 #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
1993 #endif
1994 
1995 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
1996  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
1997  !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
1998 #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
1999 #endif
2000 
2001 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2002  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
2003  !defined(POLARSSL_X509_CRT_PARSE_C) )
2004 #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2005 #endif
2006 
2007 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
2008  ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
2009  !defined(POLARSSL_PKCS1_V15) )
2010 #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2011 #endif
2012 
2013 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
2014  ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
2015  !defined(POLARSSL_PKCS1_V15) )
2016 #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2017 #endif
2018 
2019 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2020 #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2021 #endif
2022 
2023 #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2024 #error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2025 #endif
2026 
2027 #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2028 #error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2029 #endif
2030 
2031 #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2032 #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2033 #endif
2034 
2035 #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2036 #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
2037 #endif
2038 
2039 #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2040 #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2041 #endif
2042 
2043 #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2044 #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2045 #endif
2046 
2047 #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
2048 #error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2049 #endif
2050 
2051 #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2052  !defined(POLARSSL_OID_C) )
2053 #error "POLARSSL_RSA_C defined, but not all prerequisites"
2054 #endif
2055 
2056 #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2057  !defined(POLARSSL_SHA1_C) )
2058 #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2059 #endif
2060 
2061 #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2062  !defined(POLARSSL_SHA1_C) )
2063 #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2064 #endif
2065 
2066 #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2067  !defined(POLARSSL_SHA1_C) )
2068 #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2069 #endif
2070 
2071 #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2072  !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2073 #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2074 #endif
2075 
2076 #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2077 #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2078 #endif
2079 
2080 #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
2081  !defined(POLARSSL_MD_C) )
2082 #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2083 #endif
2084 
2085 #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2086 #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2087 #endif
2088 
2089 #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2090  !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2091  !defined(POLARSSL_SSL_PROTO_TLS1_2))
2092 #error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2093 #endif
2094 
2095 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2096  defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2097 #error "Illegal protocol selection"
2098 #endif
2099 
2100 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2101  defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2102 #error "Illegal protocol selection"
2103 #endif
2104 
2105 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2106  defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2107  !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2108 #error "Illegal protocol selection"
2109 #endif
2110 
2111 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
2112  ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2113  !defined(POLARSSL_CIPHER_MODE_CBC) )
2114 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2115 #endif
2116 
2117 #if defined(POLARSSL_THREADING_PTHREAD)
2118 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2119 #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2120 #endif
2121 #define POLARSSL_THREADING_IMPL
2122 #endif
2123 
2124 #if defined(POLARSSL_THREADING_ALT)
2125 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2126 #error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2127 #endif
2128 #define POLARSSL_THREADING_IMPL
2129 #endif
2130 
2131 #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2132 #error "POLARSSL_THREADING_C defined, single threading implementation required"
2133 #endif
2134 #undef POLARSSL_THREADING_IMPL
2135 
2136 #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2137  !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
2138  !defined(POLARSSL_PK_PARSE_C) )
2139 #error "POLARSSL_X509_USE_C defined, but not all prerequisites"
2140 #endif
2141 
2142 #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2143  !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2144  !defined(POLARSSL_PK_WRITE_C) )
2145 #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2146 #endif
2147 
2148 #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2149 #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2150 #endif
2151 
2152 #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2153 #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2154 #endif
2155 
2156 #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2157 #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2158 #endif
2159 
2160 #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2161 #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2162 #endif
2163 
2164 #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2165 #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
2166 #endif
2167 
2168 #endif /* config.h */