PolarSSL v1.3.4
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_RIPEMD160_ALT
152 //#define POLARSSL_SHA1_ALT
153 //#define POLARSSL_SHA256_ALT
154 //#define POLARSSL_SHA512_ALT
155 
164 //#define POLARSSL_AES_ROM_TABLES
165 
171 #define POLARSSL_CIPHER_MODE_CBC
172 
178 #define POLARSSL_CIPHER_MODE_CFB
179 
185 #define POLARSSL_CIPHER_MODE_CTR
186 
230 #define POLARSSL_CIPHER_PADDING_PKCS7
231 #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
232 #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
233 #define POLARSSL_CIPHER_PADDING_ZEROS
234 
258 #define POLARSSL_ECP_DP_SECP192R1_ENABLED
259 #define POLARSSL_ECP_DP_SECP224R1_ENABLED
260 #define POLARSSL_ECP_DP_SECP256R1_ENABLED
261 #define POLARSSL_ECP_DP_SECP384R1_ENABLED
262 #define POLARSSL_ECP_DP_SECP521R1_ENABLED
263 #define POLARSSL_ECP_DP_SECP192K1_ENABLED
264 #define POLARSSL_ECP_DP_SECP224K1_ENABLED
265 #define POLARSSL_ECP_DP_SECP256K1_ENABLED
266 #define POLARSSL_ECP_DP_BP256R1_ENABLED
267 #define POLARSSL_ECP_DP_BP384R1_ENABLED
268 #define POLARSSL_ECP_DP_BP512R1_ENABLED
269 //#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
270 #define POLARSSL_ECP_DP_M255_ENABLED
271 //#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
272 //#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
273 
283 #define POLARSSL_ECP_NIST_OPTIM
284 
297 #define POLARSSL_ECDSA_DETERMINISTIC
298 
319 #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
320 
343 #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
344 
363 #define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
364 
388 #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
389 
416 #define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
417 
442 #define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
443 
467 #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
468 
491 #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
492 
515 #define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
516 
539 #define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
540 
550 #define POLARSSL_ERROR_STRERROR_BC
551 
561 #define POLARSSL_ERROR_STRERROR_DUMMY
562 
570 #define POLARSSL_GENPRIME
571 
577 #define POLARSSL_FS_IO
578 
590 //#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
591 
601 //#define POLARSSL_NO_PLATFORM_ENTROPY
602 
615 //#define POLARSSL_MEMORY_DEBUG
616 
627 //#define POLARSSL_MEMORY_BACKTRACE
628 
638 #define POLARSSL_PKCS1_V15
639 
649 #define POLARSSL_PKCS1_V21
650 
659 //#define POLARSSL_RSA_NO_CRT
660 
666 #define POLARSSL_SELF_TEST
667 
680 #define POLARSSL_SSL_ALERT_MESSAGES
681 
696 //#define POLARSSL_SSL_DEBUG_ALL
697 
706 //#define POLARSSL_SSL_HW_RECORD_ACCEL
707 
716 #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
717 
726 //#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
727 
735 #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
736 
747 #define POLARSSL_SSL_PROTO_SSL3
748 
759 #define POLARSSL_SSL_PROTO_TLS1
760 
771 #define POLARSSL_SSL_PROTO_TLS1_1
772 
783 #define POLARSSL_SSL_PROTO_TLS1_2
784 
796 #define POLARSSL_SSL_SESSION_TICKETS
797 
805 #define POLARSSL_SSL_SERVER_NAME_INDICATION
806 
814 #define POLARSSL_SSL_TRUNCATED_HMAC
815 
825 //#define POLARSSL_THREADING_ALT
826 
836 //#define POLARSSL_THREADING_PTHREAD
837 
846 //#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
847 
856 //#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
857 
872 //#define POLARSSL_ZLIB_SUPPORT
873 /* \} name SECTION: PolarSSL feature support */
874 
894 #define POLARSSL_AESNI_C
895 
969 #define POLARSSL_AES_C
970 
992 #define POLARSSL_ARC4_C
993 
1006 #define POLARSSL_ASN1_PARSE_C
1007 
1020 #define POLARSSL_ASN1_WRITE_C
1021 
1032 #define POLARSSL_BASE64_C
1033 
1047 #define POLARSSL_BIGNUM_C
1048 
1056 #define POLARSSL_BLOWFISH_C
1057 
1111 #define POLARSSL_CAMELLIA_C
1112 
1125 #define POLARSSL_CERTS_C
1126 
1137 #define POLARSSL_CIPHER_C
1138 
1151 #define POLARSSL_CTR_DRBG_C
1152 
1165 #define POLARSSL_DEBUG_C
1166 
1191 #define POLARSSL_DES_C
1192 
1205 #define POLARSSL_DHM_C
1206 
1221 #define POLARSSL_ECDH_C
1222 
1236 #define POLARSSL_ECDSA_C
1237 
1249 #define POLARSSL_ECP_C
1250 
1263 #define POLARSSL_ENTROPY_C
1264 
1275 #define POLARSSL_ERROR_C
1276 
1289 #define POLARSSL_GCM_C
1290 
1312 //#define POLARSSL_HAVEGE_C
1313 
1324 #define POLARSSL_MD_C
1325 
1336 //#define POLARSSL_MD2_C
1337 
1348 //#define POLARSSL_MD4_C
1349 
1363 #define POLARSSL_MD5_C
1364 
1377 //#define POLARSSL_MEMORY_C
1378 
1392 //#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1393 
1403 #define POLARSSL_NET_C
1404 
1426 #define POLARSSL_OID_C
1427 
1440 #define POLARSSL_PADLOCK_C
1441 
1454 #define POLARSSL_PBKDF2_C
1455 
1472 #define POLARSSL_PEM_PARSE_C
1473 
1488 #define POLARSSL_PEM_WRITE_C
1489 
1504 #define POLARSSL_PK_C
1505 
1519 #define POLARSSL_PK_PARSE_C
1520 
1533 #define POLARSSL_PK_WRITE_C
1534 
1546 #define POLARSSL_PKCS5_C
1547 
1561 //#define POLARSSL_PKCS11_C
1562 
1577 #define POLARSSL_PKCS12_C
1578 
1588 #define POLARSSL_RIPEMD160_C
1589 
1606 #define POLARSSL_RSA_C
1607 
1622 #define POLARSSL_SHA1_C
1623 
1640 #define POLARSSL_SHA256_C
1641 
1656 #define POLARSSL_SHA512_C
1657 
1668 #define POLARSSL_SSL_CACHE_C
1669 
1682 #define POLARSSL_SSL_CLI_C
1683 
1696 #define POLARSSL_SSL_SRV_C
1697 
1712 #define POLARSSL_SSL_TLS_C
1713 
1733 //#define POLARSSL_THREADING_C
1734 
1745 #define POLARSSL_TIMING_C
1746 
1756 #define POLARSSL_VERSION_C
1757 
1773 #define POLARSSL_X509_USE_C
1774 
1789 #define POLARSSL_X509_CRT_PARSE_C
1790 
1803 #define POLARSSL_X509_CRL_PARSE_C
1804 
1817 #define POLARSSL_X509_CSR_PARSE_C
1818 
1830 #define POLARSSL_X509_CREATE_C
1831 
1843 #define POLARSSL_X509_CRT_WRITE_C
1844 
1856 #define POLARSSL_X509_CSR_WRITE_C
1857 
1866 #define POLARSSL_XTEA_C
1867 
1868 /* \} name SECTION: PolarSSL modules */
1869 
1888 //#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
1889 
1890 #if defined(POLARSSL_CONFIG_OPTIONS)
1891 
1892 // MPI / BIGNUM options
1893 //
1894 #define POLARSSL_MPI_WINDOW_SIZE 6
1895 #define POLARSSL_MPI_MAX_SIZE 512
1897 // CTR_DRBG options
1898 //
1899 #define CTR_DRBG_ENTROPY_LEN 48
1900 #define CTR_DRBG_RESEED_INTERVAL 10000
1901 #define CTR_DRBG_MAX_INPUT 256
1902 #define CTR_DRBG_MAX_REQUEST 1024
1903 #define CTR_DRBG_MAX_SEED_INPUT 384
1905 // ECP options
1906 //
1907 #define POLARSSL_ECP_MAX_BITS 521
1908 #define POLARSSL_ECP_WINDOW_SIZE 6
1909 #define POLARSSL_ECP_FIXED_POINT_OPTIM 1
1911 // Entropy options
1912 //
1913 #define ENTROPY_MAX_SOURCES 20
1914 #define ENTROPY_MAX_GATHER 128
1916 // Memory options
1917 #define MEMORY_ALIGN_MULTIPLE 4
1918 #define POLARSSL_MEMORY_STDMALLOC malloc
1919 #define POLARSSL_MEMORY_STDFREE free
1921 // SSL Cache options
1922 //
1923 #define SSL_CACHE_DEFAULT_TIMEOUT 86400
1924 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50
1926 // SSL options
1927 //
1928 #define SSL_MAX_CONTENT_LEN 16384
1929 #define SSL_DEFAULT_TICKET_LIFETIME 86400
1931 #endif /* POLARSSL_CONFIG_OPTIONS */
1932 
1933 /* \} name */
1934 
1935 /*
1936  * Sanity checks on defines and dependencies
1937  */
1938 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
1939 #error "POLARSSL_AESNI_C defined, but not all prerequisites"
1940 #endif
1941 
1942 #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
1943 #error "POLARSSL_CERTS_C defined, but not all prerequisites"
1944 #endif
1945 
1946 #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
1947 #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
1948 #endif
1949 
1950 #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
1951 #error "POLARSSL_DHM_C defined, but not all prerequisites"
1952 #endif
1953 
1954 #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
1955 #error "POLARSSL_ECDH_C defined, but not all prerequisites"
1956 #endif
1957 
1958 #if defined(POLARSSL_ECDSA_C) && \
1959  ( !defined(POLARSSL_ECP_C) || \
1960  !defined(POLARSSL_ASN1_PARSE_C) || \
1961  !defined(POLARSSL_ASN1_WRITE_C) )
1962 #error "POLARSSL_ECDSA_C defined, but not all prerequisites"
1963 #endif
1964 
1965 #if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_MD_C)
1966 #error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
1967 #endif
1968 
1969 #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
1970  !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
1971  !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
1972  !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
1973  !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
1974  !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
1975  !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
1976  !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
1977  !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) ) )
1978 #error "POLARSSL_ECP_C defined, but not all prerequisites"
1979 #endif
1980 
1981 #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
1982  !defined(POLARSSL_SHA256_C))
1983 #error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
1984 #endif
1985 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
1986  defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
1987 #error "CTR_DRBG_ENTROPY_LEN value too high"
1988 #endif
1989 #if defined(POLARSSL_ENTROPY_C) && !defined(POLARSSL_SHA512_C) && \
1990  defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
1991 #error "CTR_DRBG_ENTROPY_LEN value too high"
1992 #endif
1993 
1994 #if defined(POLARSSL_GCM_C) && ( \
1995  !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
1996 #error "POLARSSL_GCM_C defined, but not all prerequisites"
1997 #endif
1998 
1999 #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2000 #error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2001 #endif
2002 
2003 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2004  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2005 #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2006 #endif
2007 
2008 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2009  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2010 #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2011 #endif
2012 
2013 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2014 #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2015 #endif
2016 
2017 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2018  !defined(POLARSSL_ECDH_C)
2019 #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2020 #endif
2021 
2022 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2023  ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
2024  !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
2025 #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2026 #endif
2027 
2028 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2029  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
2030  !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
2031 #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2032 #endif
2033 
2034 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2035  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
2036  !defined(POLARSSL_X509_CRT_PARSE_C) )
2037 #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2038 #endif
2039 
2040 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
2041  ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
2042  !defined(POLARSSL_PKCS1_V15) )
2043 #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2044 #endif
2045 
2046 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
2047  ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
2048  !defined(POLARSSL_PKCS1_V15) )
2049 #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2050 #endif
2051 
2052 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && !defined(POLARSSL_MEMORY_C)
2053 #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2054 #endif
2055 
2056 #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2057 #error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2058 #endif
2059 
2060 #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2061 #error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2062 #endif
2063 
2064 #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2065 #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2066 #endif
2067 
2068 #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2069 #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
2070 #endif
2071 
2072 #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2073 #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2074 #endif
2075 
2076 #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2077 #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2078 #endif
2079 
2080 #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
2081 #error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2082 #endif
2083 
2084 #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2085  !defined(POLARSSL_OID_C) )
2086 #error "POLARSSL_RSA_C defined, but not all prerequisites"
2087 #endif
2088 
2089 #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2090  !defined(POLARSSL_SHA1_C) )
2091 #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2092 #endif
2093 
2094 #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2095  !defined(POLARSSL_SHA1_C) )
2096 #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2097 #endif
2098 
2099 #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2100  !defined(POLARSSL_SHA1_C) )
2101 #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2102 #endif
2103 
2104 #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2105  !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2106 #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2107 #endif
2108 
2109 #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2110 #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2111 #endif
2112 
2113 #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
2114  !defined(POLARSSL_MD_C) )
2115 #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2116 #endif
2117 
2118 #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2119 #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2120 #endif
2121 
2122 #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2123  !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2124  !defined(POLARSSL_SSL_PROTO_TLS1_2))
2125 #error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2126 #endif
2127 
2128 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2129  defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2130 #error "Illegal protocol selection"
2131 #endif
2132 
2133 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2134  defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2135 #error "Illegal protocol selection"
2136 #endif
2137 
2138 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2139  defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2140  !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2141 #error "Illegal protocol selection"
2142 #endif
2143 
2144 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
2145  ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2146  !defined(POLARSSL_CIPHER_MODE_CBC) )
2147 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2148 #endif
2149 
2150 #if defined(POLARSSL_THREADING_PTHREAD)
2151 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2152 #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2153 #endif
2154 #define POLARSSL_THREADING_IMPL
2155 #endif
2156 
2157 #if defined(POLARSSL_THREADING_ALT)
2158 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2159 #error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2160 #endif
2161 #define POLARSSL_THREADING_IMPL
2162 #endif
2163 
2164 #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2165 #error "POLARSSL_THREADING_C defined, single threading implementation required"
2166 #endif
2167 #undef POLARSSL_THREADING_IMPL
2168 
2169 #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2170  !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
2171  !defined(POLARSSL_PK_PARSE_C) )
2172 #error "POLARSSL_X509_USE_C defined, but not all prerequisites"
2173 #endif
2174 
2175 #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2176  !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2177  !defined(POLARSSL_PK_WRITE_C) )
2178 #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2179 #endif
2180 
2181 #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2182 #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2183 #endif
2184 
2185 #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2186 #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2187 #endif
2188 
2189 #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2190 #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2191 #endif
2192 
2193 #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2194 #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2195 #endif
2196 
2197 #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2198 #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
2199 #endif
2200 
2201 #endif /* config.h */