API Documentation (Doxygen generated)

These pages are generated with doxygen directly from the source code!

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 
133 //#define POLARSSL_PLATFORM_MEMORY
134 
150 //#define POLARSSL_PLATFORM_PRINTF_ALT
151 //#define POLARSSL_PLATFORM_FPRINTF_ALT
152 /* \} name SECTION: System support */
153 
173 //#define POLARSSL_TIMING_ALT
174 
191 //#define POLARSSL_AES_ALT
192 //#define POLARSSL_ARC4_ALT
193 //#define POLARSSL_BLOWFISH_ALT
194 //#define POLARSSL_CAMELLIA_ALT
195 //#define POLARSSL_DES_ALT
196 //#define POLARSSL_XTEA_ALT
197 //#define POLARSSL_MD2_ALT
198 //#define POLARSSL_MD4_ALT
199 //#define POLARSSL_MD5_ALT
200 //#define POLARSSL_RIPEMD160_ALT
201 //#define POLARSSL_SHA1_ALT
202 //#define POLARSSL_SHA256_ALT
203 //#define POLARSSL_SHA512_ALT
204 
213 //#define POLARSSL_AES_ROM_TABLES
214 
220 #define POLARSSL_CIPHER_MODE_CBC
221 
227 #define POLARSSL_CIPHER_MODE_CFB
228 
234 #define POLARSSL_CIPHER_MODE_CTR
235 
279 #define POLARSSL_CIPHER_PADDING_PKCS7
280 #define POLARSSL_CIPHER_PADDING_ONE_AND_ZEROS
281 #define POLARSSL_CIPHER_PADDING_ZEROS_AND_LEN
282 #define POLARSSL_CIPHER_PADDING_ZEROS
283 
307 #define POLARSSL_ECP_DP_SECP192R1_ENABLED
308 #define POLARSSL_ECP_DP_SECP224R1_ENABLED
309 #define POLARSSL_ECP_DP_SECP256R1_ENABLED
310 #define POLARSSL_ECP_DP_SECP384R1_ENABLED
311 #define POLARSSL_ECP_DP_SECP521R1_ENABLED
312 #define POLARSSL_ECP_DP_SECP192K1_ENABLED
313 #define POLARSSL_ECP_DP_SECP224K1_ENABLED
314 #define POLARSSL_ECP_DP_SECP256K1_ENABLED
315 #define POLARSSL_ECP_DP_BP256R1_ENABLED
316 #define POLARSSL_ECP_DP_BP384R1_ENABLED
317 #define POLARSSL_ECP_DP_BP512R1_ENABLED
318 //#define POLARSSL_ECP_DP_M221_ENABLED // Not implemented yet!
319 #define POLARSSL_ECP_DP_M255_ENABLED
320 //#define POLARSSL_ECP_DP_M383_ENABLED // Not implemented yet!
321 //#define POLARSSL_ECP_DP_M511_ENABLED // Not implemented yet!
322 
332 #define POLARSSL_ECP_NIST_OPTIM
333 
346 #define POLARSSL_ECDSA_DETERMINISTIC
347 
368 #define POLARSSL_KEY_EXCHANGE_PSK_ENABLED
369 
392 #define POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED
393 
412 #define POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED
413 
437 #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED
438 
465 #define POLARSSL_KEY_EXCHANGE_RSA_ENABLED
466 
491 #define POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED
492 
516 #define POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED
517 
540 #define POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
541 
564 #define POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
565 
588 #define POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED
589 
602 #define POLARSSL_PK_PARSE_EC_EXTENDED
603 
613 #define POLARSSL_ERROR_STRERROR_BC
614 
624 #define POLARSSL_ERROR_STRERROR_DUMMY
625 
633 #define POLARSSL_GENPRIME
634 
640 #define POLARSSL_FS_IO
641 
653 //#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
654 
664 //#define POLARSSL_NO_PLATFORM_ENTROPY
665 
680 //#define POLARSSL_ENTROPY_FORCE_SHA256
681 
693 //#define POLARSSL_MEMORY_DEBUG
694 
705 //#define POLARSSL_MEMORY_BACKTRACE
706 
716 #define POLARSSL_PKCS1_V15
717 
727 #define POLARSSL_PKCS1_V21
728 
737 //#define POLARSSL_RSA_NO_CRT
738 
744 #define POLARSSL_SELF_TEST
745 
758 #define POLARSSL_SSL_ALERT_MESSAGES
759 
774 //#define POLARSSL_SSL_DEBUG_ALL
775 
784 //#define POLARSSL_SSL_HW_RECORD_ACCEL
785 
794 #define POLARSSL_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
795 
804 //#define POLARSSL_SSL_SRV_RESPECT_CLIENT_PREFERENCE
805 
813 #define POLARSSL_SSL_MAX_FRAGMENT_LENGTH
814 
825 #define POLARSSL_SSL_PROTO_SSL3
826 
837 #define POLARSSL_SSL_PROTO_TLS1
838 
849 #define POLARSSL_SSL_PROTO_TLS1_1
850 
861 #define POLARSSL_SSL_PROTO_TLS1_2
862 
871 #define POLARSSL_SSL_ALPN
872 
884 #define POLARSSL_SSL_SESSION_TICKETS
885 
893 #define POLARSSL_SSL_SERVER_NAME_INDICATION
894 
902 #define POLARSSL_SSL_TRUNCATED_HMAC
903 
916 //#define POLARSSL_SSL_SET_CURVES
917 
927 //#define POLARSSL_THREADING_ALT
928 
938 //#define POLARSSL_THREADING_PTHREAD
939 
948 //#define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3
949 
958 //#define POLARSSL_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
959 
972 #define POLARSSL_X509_CHECK_KEY_USAGE
973 
985 #define POLARSSL_X509_CHECK_EXTENDED_KEY_USAGE
986 
1005 //#define POLARSSL_ZLIB_SUPPORT
1006 /* \} name SECTION: PolarSSL feature support */
1007 
1027 #define POLARSSL_AESNI_C
1028 
1102 #define POLARSSL_AES_C
1103 
1125 #define POLARSSL_ARC4_C
1126 
1139 #define POLARSSL_ASN1_PARSE_C
1140 
1153 #define POLARSSL_ASN1_WRITE_C
1154 
1165 #define POLARSSL_BASE64_C
1166 
1180 #define POLARSSL_BIGNUM_C
1181 
1189 #define POLARSSL_BLOWFISH_C
1190 
1244 #define POLARSSL_CAMELLIA_C
1245 
1258 #define POLARSSL_CERTS_C
1259 
1270 #define POLARSSL_CIPHER_C
1271 
1284 #define POLARSSL_CTR_DRBG_C
1285 
1298 #define POLARSSL_DEBUG_C
1299 
1324 #define POLARSSL_DES_C
1325 
1338 #define POLARSSL_DHM_C
1339 
1354 #define POLARSSL_ECDH_C
1355 
1369 #define POLARSSL_ECDSA_C
1370 
1382 #define POLARSSL_ECP_C
1383 
1396 #define POLARSSL_ENTROPY_C
1397 
1408 #define POLARSSL_ERROR_C
1409 
1422 #define POLARSSL_GCM_C
1423 
1445 //#define POLARSSL_HAVEGE_C
1446 
1459 #define POLARSSL_HMAC_DRBG_C
1460 
1471 #define POLARSSL_MD_C
1472 
1483 //#define POLARSSL_MD2_C
1484 
1495 //#define POLARSSL_MD4_C
1496 
1510 #define POLARSSL_MD5_C
1511 
1516 //#define POLARSSL_MEMORY_C
1517 
1532 //#define POLARSSL_MEMORY_BUFFER_ALLOC_C
1533 
1543 #define POLARSSL_NET_C
1544 
1566 #define POLARSSL_OID_C
1567 
1580 #define POLARSSL_PADLOCK_C
1581 
1594 #define POLARSSL_PBKDF2_C
1595 
1612 #define POLARSSL_PEM_PARSE_C
1613 
1628 #define POLARSSL_PEM_WRITE_C
1629 
1644 #define POLARSSL_PK_C
1645 
1659 #define POLARSSL_PK_PARSE_C
1660 
1673 #define POLARSSL_PK_WRITE_C
1674 
1686 #define POLARSSL_PKCS5_C
1687 
1701 //#define POLARSSL_PKCS11_C
1702 
1717 #define POLARSSL_PKCS12_C
1718 
1730 #define POLARSSL_PLATFORM_C
1731 
1741 #define POLARSSL_RIPEMD160_C
1742 
1759 #define POLARSSL_RSA_C
1760 
1775 #define POLARSSL_SHA1_C
1776 
1793 #define POLARSSL_SHA256_C
1794 
1809 #define POLARSSL_SHA512_C
1810 
1821 #define POLARSSL_SSL_CACHE_C
1822 
1835 #define POLARSSL_SSL_CLI_C
1836 
1849 #define POLARSSL_SSL_SRV_C
1850 
1865 #define POLARSSL_SSL_TLS_C
1866 
1886 //#define POLARSSL_THREADING_C
1887 
1898 #define POLARSSL_TIMING_C
1899 
1909 #define POLARSSL_VERSION_C
1910 
1926 #define POLARSSL_X509_USE_C
1927 
1942 #define POLARSSL_X509_CRT_PARSE_C
1943 
1956 #define POLARSSL_X509_CRL_PARSE_C
1957 
1970 #define POLARSSL_X509_CSR_PARSE_C
1971 
1983 #define POLARSSL_X509_CREATE_C
1984 
1996 #define POLARSSL_X509_CRT_WRITE_C
1997 
2009 #define POLARSSL_X509_CSR_WRITE_C
2010 
2019 #define POLARSSL_XTEA_C
2020 
2021 /* \} name SECTION: PolarSSL modules */
2022 
2041 //#define POLARSSL_CONFIG_OPTIONS /**< Enable config.h module value configuration */
2042 
2043 #if defined(POLARSSL_CONFIG_OPTIONS)
2044 
2045 // MPI / BIGNUM options
2046 //
2047 #define POLARSSL_MPI_WINDOW_SIZE 6
2048 #define POLARSSL_MPI_MAX_SIZE 512
2050 // CTR_DRBG options
2051 //
2052 #define CTR_DRBG_ENTROPY_LEN 48
2053 #define CTR_DRBG_RESEED_INTERVAL 10000
2054 #define CTR_DRBG_MAX_INPUT 256
2055 #define CTR_DRBG_MAX_REQUEST 1024
2056 #define CTR_DRBG_MAX_SEED_INPUT 384
2058 // HMAC_DRBG options
2059 //
2060 #define POLARSSL_HMAC_DRBG_RESEED_INTERVAL 10000
2061 #define POLARSSL_HMAC_DRBG_MAX_INPUT 256
2062 #define POLARSSL_HMAC_DRBG_MAX_REQUEST 1024
2063 #define POLARSSL_HMAC_DRBG_MAX_SEED_INPUT 384
2065 // ECP options
2066 //
2067 #define POLARSSL_ECP_MAX_BITS 521
2068 #define POLARSSL_ECP_WINDOW_SIZE 6
2069 #define POLARSSL_ECP_FIXED_POINT_OPTIM 1
2071 // Entropy options
2072 //
2073 #define ENTROPY_MAX_SOURCES 20
2074 #define ENTROPY_MAX_GATHER 128
2076 // Memory buffer allocator options
2077 #define MEMORY_ALIGN_MULTIPLE 4
2079 // Platform options
2080 //
2081 #define POLARSSL_PLATFORM_STD_MEM_HDR <stdlib.h>
2082 #define POLARSSL_PLATFORM_STD_MALLOC malloc
2083 #define POLARSSL_PLATFORM_STD_FREE free
2084 #define POLARSSL_PLATFORM_STD_PRINTF printf
2085 #define POLARSSL_PLATFORM_STD_FPRINTF fprintf
2087 // SSL Cache options
2088 //
2089 #define SSL_CACHE_DEFAULT_TIMEOUT 86400
2090 #define SSL_CACHE_DEFAULT_MAX_ENTRIES 50
2092 // SSL options
2093 //
2094 #define SSL_MAX_CONTENT_LEN 16384
2095 #define SSL_DEFAULT_TICKET_LIFETIME 86400
2097 #endif /* POLARSSL_CONFIG_OPTIONS */
2098 
2099 /* \} name */
2100 
2101 /*
2102  * Sanity checks on defines and dependencies
2103  */
2104 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
2105 #error "POLARSSL_AESNI_C defined, but not all prerequisites"
2106 #endif
2107 
2108 #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
2109 #error "POLARSSL_CERTS_C defined, but not all prerequisites"
2110 #endif
2111 
2112 #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
2113 #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
2114 #endif
2115 
2116 #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
2117 #error "POLARSSL_DHM_C defined, but not all prerequisites"
2118 #endif
2119 
2120 #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
2121 #error "POLARSSL_ECDH_C defined, but not all prerequisites"
2122 #endif
2123 
2124 #if defined(POLARSSL_ECDSA_C) && \
2125  ( !defined(POLARSSL_ECP_C) || \
2126  !defined(POLARSSL_ASN1_PARSE_C) || \
2127  !defined(POLARSSL_ASN1_WRITE_C) )
2128 #error "POLARSSL_ECDSA_C defined, but not all prerequisites"
2129 #endif
2130 
2131 #if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
2132 #error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
2133 #endif
2134 
2135 #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
2136  !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
2137  !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
2138  !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
2139  !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
2140  !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
2141  !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
2142  !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
2143  !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
2144  !defined(POLARSSL_ECP_DP_M255_ENABLED) && \
2145  !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
2146  !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
2147  !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
2148 #error "POLARSSL_ECP_C defined, but not all prerequisites"
2149 #endif
2150 
2151 #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
2152  !defined(POLARSSL_SHA256_C))
2153 #error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
2154 #endif
2155 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
2156  defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 64)
2157 #error "CTR_DRBG_ENTROPY_LEN value too high"
2158 #endif
2159 #if defined(POLARSSL_ENTROPY_C) && \
2160  ( !defined(POLARSSL_SHA512_C) || defined(POLARSSL_ENTROPY_FORCE_SHA256) ) \
2161  && defined(POLARSSL_CONFIG_OPTIONS) && (CTR_DRBG_ENTROPY_LEN > 32)
2162 #error "CTR_DRBG_ENTROPY_LEN value too high"
2163 #endif
2164 #if defined(POLARSSL_ENTROPY_C) && \
2165  defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C)
2166 #error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
2167 #endif
2168 
2169 #if defined(POLARSSL_GCM_C) && ( \
2170  !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
2171 #error "POLARSSL_GCM_C defined, but not all prerequisites"
2172 #endif
2173 
2174 #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
2175 #error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
2176 #endif
2177 
2178 #if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
2179 #error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
2180 #endif
2181 
2182 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
2183  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2184 #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
2185 #endif
2186 
2187 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
2188  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
2189 #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
2190 #endif
2191 
2192 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
2193 #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
2194 #endif
2195 
2196 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
2197  !defined(POLARSSL_ECDH_C)
2198 #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
2199 #endif
2200 
2201 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
2202  ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
2203  !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
2204 #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
2205 #endif
2206 
2207 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
2208  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
2209  !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
2210 #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
2211 #endif
2212 
2213 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
2214  ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
2215  !defined(POLARSSL_X509_CRT_PARSE_C) )
2216 #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
2217 #endif
2218 
2219 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
2220  ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
2221  !defined(POLARSSL_PKCS1_V15) )
2222 #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
2223 #endif
2224 
2225 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
2226  ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\
2227  !defined(POLARSSL_PKCS1_V15) )
2228 #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
2229 #endif
2230 
2231 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
2232  ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
2233 #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
2234 #endif
2235 
2236 #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
2237 #error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
2238 #endif
2239 
2240 #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
2241 #error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
2242 #endif
2243 
2244 #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
2245 #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
2246 #endif
2247 
2248 #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
2249 #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
2250 #endif
2251 
2252 #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
2253 #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
2254 #endif
2255 
2256 #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
2257 #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
2258 #endif
2259 
2260 #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
2261 #error "POLARSSL_PKCS11_C defined, but not all prerequisites"
2262 #endif
2263 
2264 #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2265  !defined(POLARSSL_OID_C) )
2266 #error "POLARSSL_RSA_C defined, but not all prerequisites"
2267 #endif
2268 
2269 #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
2270  !defined(POLARSSL_SHA1_C) )
2271 #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
2272 #endif
2273 
2274 #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
2275  !defined(POLARSSL_SHA1_C) )
2276 #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
2277 #endif
2278 
2279 #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
2280  !defined(POLARSSL_SHA1_C) )
2281 #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
2282 #endif
2283 
2284 #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
2285  !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
2286 #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
2287 #endif
2288 
2289 #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
2290 #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
2291 #endif
2292 
2293 #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
2294  !defined(POLARSSL_MD_C) )
2295 #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
2296 #endif
2297 
2298 #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
2299 #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
2300 #endif
2301 
2302 #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
2303  !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
2304  !defined(POLARSSL_SSL_PROTO_TLS1_2))
2305 #error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
2306 #endif
2307 
2308 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2309  defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
2310 #error "Illegal protocol selection"
2311 #endif
2312 
2313 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
2314  defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
2315 #error "Illegal protocol selection"
2316 #endif
2317 
2318 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
2319  defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
2320  !defined(POLARSSL_SSL_PROTO_TLS1_1)))
2321 #error "Illegal protocol selection"
2322 #endif
2323 
2324 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
2325  ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
2326  !defined(POLARSSL_CIPHER_MODE_CBC) )
2327 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
2328 #endif
2329 
2330 #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \
2331  !defined(POLARSSL_X509_CRT_PARSE_C)
2332 #error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
2333 #endif
2334 
2335 #if defined(POLARSSL_THREADING_PTHREAD)
2336 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2337 #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
2338 #endif
2339 #define POLARSSL_THREADING_IMPL
2340 #endif
2341 
2342 #if defined(POLARSSL_THREADING_ALT)
2343 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
2344 #error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
2345 #endif
2346 #define POLARSSL_THREADING_IMPL
2347 #endif
2348 
2349 #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
2350 #error "POLARSSL_THREADING_C defined, single threading implementation required"
2351 #endif
2352 #undef POLARSSL_THREADING_IMPL
2353 
2354 #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2355  !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
2356  !defined(POLARSSL_PK_PARSE_C) )
2357 #error "POLARSSL_X509_USE_C defined, but not all prerequisites"
2358 #endif
2359 
2360 #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
2361  !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
2362  !defined(POLARSSL_PK_WRITE_C) )
2363 #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
2364 #endif
2365 
2366 #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2367 #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
2368 #endif
2369 
2370 #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2371 #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
2372 #endif
2373 
2374 #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
2375 #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
2376 #endif
2377 
2378 #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2379 #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
2380 #endif
2381 
2382 #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
2383 #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"
2384 #endif
2385 
2386 #endif /* config.h */