Go to the documentation of this file.
30 #ifndef POLARSSL_CHECK_CONFIG_H
31 #define POLARSSL_CHECK_CONFIG_H
33 #if defined(POLARSSL_DEPRECATED_WARNING) && \
34 !defined(__GNUC__) && !defined(__clang__)
35 #error "POLARSSL_DEPRECATED_WARNING only works with GCC and Clang"
38 #if defined(POLARSSL_NET_C) && !defined(POLARSSL_HAVE_IPV6)
39 #if defined(POLARSSL_DEPRECATED_WARNING)
40 #warning "Using POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated"
42 #if defined(POLARSSL_DEPRECATED_REMOVED)
43 #define POLARSSL_HAVE_IPV6
47 #if defined(POLARSSL_ERROR_STRERROR_BC)
48 #if defined(POLARSSL_DEPRECATED_WARNING)
49 #warning "POLARSSL_ERROR_STRERROR_BC is deprecated"
51 #if defined(POLARSSL_DEPRECATED_REMOVED)
52 #error "POLARSSL_ERROR_STRERROR_BC is deprecated"
56 #if defined(POLARSSL_MEMORY_C)
57 #if defined(POLARSSL_DEPRECATED_WARNING)
58 #warning "POLARSSL_MEMORY_C is deprecated"
60 #if defined(POLARSSL_DEPRECATED_REMOVED)
61 #error "POLARSSL_MEMORY_C is deprecated"
65 #if defined(POLARSSL_PBKDF2_C)
66 #if defined(POLARSSL_DEPRECATED_WARNING)
67 #warning "POLARSSL_PBKDF2_C is deprecated"
69 #if defined(POLARSSL_DEPRECATED_REMOVED)
70 #error "POLARSSL_PBKDF2_C is deprecated"
74 #if defined(POLARSSL_HAVE_INT8)
75 #if defined(POLARSSL_DEPRECATED_WARNING)
76 #warning "POLARSSL_HAVE_INT8 is deprecated"
78 #if defined(POLARSSL_DEPRECATED_REMOVED)
79 #error "POLARSSL_HAVE_INT8 is deprecated"
83 #if defined(POLARSSL_HAVE_INT16)
84 #if defined(POLARSSL_DEPRECATED_WARNING)
85 #warning "POLARSSL_HAVE_INT16 is deprecated"
87 #if defined(POLARSSL_DEPRECATED_REMOVED)
88 #error "POLARSSL_HAVE_INT16 is deprecated"
92 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
93 #error "POLARSSL_AESNI_C defined, but not all prerequisites"
96 #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C)
97 #error "POLARSSL_CERTS_C defined, but not all prerequisites"
100 #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C)
101 #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites"
104 #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C)
105 #error "POLARSSL_DHM_C defined, but not all prerequisites"
108 #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C)
109 #error "POLARSSL_ECDH_C defined, but not all prerequisites"
112 #if defined(POLARSSL_ECDSA_C) && \
113 ( !defined(POLARSSL_ECP_C) || \
114 !defined(POLARSSL_ASN1_PARSE_C) || \
115 !defined(POLARSSL_ASN1_WRITE_C) )
116 #error "POLARSSL_ECDSA_C defined, but not all prerequisites"
119 #if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C)
120 #error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites"
123 #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \
124 !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \
125 !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \
126 !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \
127 !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \
128 !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \
129 !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \
130 !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \
131 !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \
132 !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \
133 !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \
134 !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) )
135 #error "POLARSSL_ECP_C defined, but not all prerequisites"
138 #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \
139 !defined(POLARSSL_SHA256_C))
140 #error "POLARSSL_ENTROPY_C defined, but not all prerequisites"
142 #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \
143 defined(CTR_DRBG_ENTROPY_LEN) && (CTR_DRBG_ENTROPY_LEN > 64)
144 #error "CTR_DRBG_ENTROPY_LEN value too high"
146 #if defined(POLARSSL_ENTROPY_C) && \
147 ( !defined(POLARSSL_SHA512_C) || defined(POLARSSL_ENTROPY_FORCE_SHA256) ) \
148 && defined(CTR_DRBG_ENTROPY_LEN) && (CTR_DRBG_ENTROPY_LEN > 32)
149 #error "CTR_DRBG_ENTROPY_LEN value too high"
151 #if defined(POLARSSL_ENTROPY_C) && \
152 defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C)
153 #error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
156 #if defined(POLARSSL_GCM_C) && ( \
157 !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) )
158 #error "POLARSSL_GCM_C defined, but not all prerequisites"
161 #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C)
162 #error "POLARSSL_HAVEGE_C defined, but not all prerequisites"
165 #if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C)
166 #error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites"
169 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \
170 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
171 #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites"
174 #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \
175 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) )
176 #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites"
179 #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C)
180 #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites"
183 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \
184 !defined(POLARSSL_ECDH_C)
185 #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites"
188 #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \
189 ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \
190 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
191 #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites"
194 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \
195 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \
196 !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) )
197 #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites"
200 #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \
201 ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \
202 !defined(POLARSSL_X509_CRT_PARSE_C) )
203 #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites"
206 #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \
207 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) || \
208 !defined(POLARSSL_PKCS1_V15) )
209 #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites"
212 #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \
213 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) || \
214 !defined(POLARSSL_PKCS1_V15) )
215 #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites"
218 #if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_C)
219 #error "POLARSSL_MEMORY_C defined, but not all prerequisites"
222 #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \
223 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
224 #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
227 #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM)
228 #error "POLARSSL_PADLOCK_C defined, but not all prerequisites"
231 #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C)
232 #error "POLARSSL_PBKDF2_C defined, but not all prerequisites"
235 #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C)
236 #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites"
239 #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C)
240 #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites"
243 #if defined(POLARSSL_PK_C) && \
244 ( !defined(POLARSSL_RSA_C) && !defined(POLARSSL_ECP_C) )
245 #error "POLARSSL_PK_C defined, but not all prerequisites"
248 #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C)
249 #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites"
252 #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C)
253 #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites"
256 #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C)
257 #error "POLARSSL_PKCS11_C defined, but not all prerequisites"
260 #if defined(POLARSSL_PLATFORM_EXIT_ALT) && !defined(POLARSSL_PLATFORM_C)
261 #error "POLARSSL_PLATFORM_EXIT_ALT defined, but not all prerequisites"
264 #if defined(POLARSSL_PLATFORM_EXIT_MACRO) && !defined(POLARSSL_PLATFORM_C)
265 #error "POLARSSL_PLATFORM_EXIT_MACRO defined, but not all prerequisites"
268 #if defined(POLARSSL_PLATFORM_EXIT_MACRO) &&\
269 ( defined(POLARSSL_PLATFORM_STD_EXIT) ||\
270 defined(POLARSSL_PLATFORM_EXIT_ALT) )
271 #error "POLARSSL_PLATFORM_EXIT_MACRO and POLARSSL_PLATFORM_STD_EXIT/POLARSSL_PLATFORM_EXIT_ALT cannot be defined simultaneously"
274 #if defined(POLARSSL_PLATFORM_FPRINTF_ALT) && !defined(POLARSSL_PLATFORM_C)
275 #error "POLARSSL_PLATFORM_FPRINTF_ALT defined, but not all prerequisites"
278 #if defined(POLARSSL_PLATFORM_FPRINTF_MACRO) && !defined(POLARSSL_PLATFORM_C)
279 #error "POLARSSL_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites"
282 #if defined(POLARSSL_PLATFORM_FPRINTF_MACRO) &&\
283 ( defined(POLARSSL_PLATFORM_STD_FPRINTF) ||\
284 defined(POLARSSL_PLATFORM_FPRINTF_ALT) )
285 #error "POLARSSL_PLATFORM_FPRINTF_MACRO and POLARSSL_PLATFORM_STD_FPRINTF/POLARSSL_PLATFORM_FPRINTF_ALT cannot be defined simultaneously"
288 #if defined(POLARSSL_PLATFORM_FREE_MACRO) &&\
289 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
290 #error "POLARSSL_PLATFORM_FREE_MACRO defined, but not all prerequisites"
293 #if defined(POLARSSL_PLATFORM_FREE_MACRO) &&\
294 defined(POLARSSL_PLATFORM_STD_FREE)
295 #error "POLARSSL_PLATFORM_FREE_MACRO and POLARSSL_PLATFORM_STD_FREE cannot be defined simultaneously"
298 #if defined(POLARSSL_PLATFORM_FREE_MACRO) && !defined(POLARSSL_PLATFORM_MALLOC_MACRO)
299 #error "POLARSSL_PLATFORM_MALLOC_MACRO must be defined if POLARSSL_PLATFORM_FREE_MACRO is"
302 #if defined(POLARSSL_PLATFORM_MALLOC_MACRO) &&\
303 ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) )
304 #error "POLARSSL_PLATFORM_MALLOC_MACRO defined, but not all prerequisites"
307 #if defined(POLARSSL_PLATFORM_MALLOC_MACRO) &&\
308 defined(POLARSSL_PLATFORM_STD_MALLOC)
309 #error "POLARSSL_PLATFORM_MALLOC_MACRO and POLARSSL_PLATFORM_STD_MALLOC cannot be defined simultaneously"
312 #if defined(POLARSSL_PLATFORM_MALLOC_MACRO) && !defined(POLARSSL_PLATFORM_FREE_MACRO)
313 #error "POLARSSL_PLATFORM_FREE_MACRO must be defined if POLARSSL_PLATFORM_MALLOC_MACRO is"
316 #if defined(POLARSSL_PLATFORM_MEMORY) && !defined(POLARSSL_PLATFORM_C)
317 #error "POLARSSL_PLATFORM_MEMORY defined, but not all prerequisites"
320 #if defined(POLARSSL_PLATFORM_PRINTF_ALT) && !defined(POLARSSL_PLATFORM_C)
321 #error "POLARSSL_PLATFORM_PRINTF_ALT defined, but not all prerequisites"
324 #if defined(POLARSSL_PLATFORM_PRINTF_MACRO) && !defined(POLARSSL_PLATFORM_C)
325 #error "POLARSSL_PLATFORM_PRINTF_MACRO defined, but not all prerequisites"
328 #if defined(POLARSSL_PLATFORM_PRINTF_MACRO) &&\
329 ( defined(POLARSSL_PLATFORM_STD_PRINTF) ||\
330 defined(POLARSSL_PLATFORM_PRINTF_ALT) )
331 #error "POLARSSL_PLATFORM_PRINTF_MACRO and POLARSSL_PLATFORM_STD_PRINTF/POLARSSL_PLATFORM_PRINTF_ALT cannot be defined simultaneously"
334 #if defined(POLARSSL_PLATFORM_SNPRINTF_ALT) && !defined(POLARSSL_PLATFORM_C)
335 #error "POLARSSL_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites"
338 #if defined(POLARSSL_PLATFORM_SNPRINTF_ALT) && ( defined(_WIN32)\
339 && !defined(EFIX64) && !defined(EFI32) )
340 #error "POLARSSL_PLATFORM_SNPRINTF_ALT defined but not available on Windows"
343 #if defined(POLARSSL_PLATFORM_SNPRINTF_MACRO) && !defined(POLARSSL_PLATFORM_C)
344 #error "POLARSSL_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites"
347 #if defined(POLARSSL_PLATFORM_SNPRINTF_MACRO) &&\
348 ( defined(POLARSSL_PLATFORM_STD_SNPRINTF) ||\
349 defined(POLARSSL_PLATFORM_SNPRINTF_ALT) )
350 #error "POLARSSL_PLATFORM_SNPRINTF_MACRO and POLARSSL_PLATFORM_STD_SNPRINTF/POLARSSL_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously"
353 #if defined(POLARSSL_PLATFORM_STD_MEM_HDR) &&\
354 !defined(POLARSSL_PLATFORM_NO_STD_FUNCTIONS)
355 #error "POLARSSL_PLATFORM_STD_MEM_HDR defined, but not all prerequisites"
358 #if defined(POLARSSL_PLATFORM_STD_MALLOC) && !defined(POLARSSL_PLATFORM_MEMORY)
359 #error "POLARSSL_PLATFORM_STD_MALLOC defined, but not all prerequisites"
362 #if defined(POLARSSL_PLATFORM_STD_MALLOC) && !defined(POLARSSL_PLATFORM_MEMORY)
363 #error "POLARSSL_PLATFORM_STD_MALLOC defined, but not all prerequisites"
366 #if defined(POLARSSL_PLATFORM_STD_FREE) && !defined(POLARSSL_PLATFORM_MEMORY)
367 #error "POLARSSL_PLATFORM_STD_FREE defined, but not all prerequisites"
370 #if defined(POLARSSL_PLATFORM_STD_EXIT) &&\
371 !defined(POLARSSL_PLATFORM_EXIT_ALT)
372 #error "POLARSSL_PLATFORM_STD_EXIT defined, but not all prerequisites"
375 #if defined(POLARSSL_PLATFORM_STD_FPRINTF) &&\
376 !defined(POLARSSL_PLATFORM_FPRINTF_ALT)
377 #error "POLARSSL_PLATFORM_STD_FPRINTF defined, but not all prerequisites"
380 #if defined(POLARSSL_PLATFORM_STD_PRINTF) &&\
381 !defined(POLARSSL_PLATFORM_PRINTF_ALT)
382 #error "POLARSSL_PLATFORM_STD_PRINTF defined, but not all prerequisites"
385 #if defined(POLARSSL_PLATFORM_STD_SNPRINTF) &&\
386 !defined(POLARSSL_PLATFORM_SNPRINTF_ALT)
387 #error "POLARSSL_PLATFORM_STD_SNPRINTF defined, but not all prerequisites"
390 #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \
391 !defined(POLARSSL_OID_C) )
392 #error "POLARSSL_RSA_C defined, but not all prerequisites"
395 #if defined(POLARSSL_X509_RSASSA_PSS_SUPPORT) && \
396 ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) )
397 #error "POLARSSL_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites"
400 #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \
401 !defined(POLARSSL_SHA1_C) )
402 #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites"
405 #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \
406 !defined(POLARSSL_SHA1_C) )
407 #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites"
410 #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \
411 !defined(POLARSSL_SHA1_C) )
412 #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites"
415 #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \
416 !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) )
417 #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites"
420 #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C)
421 #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites"
424 #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \
425 !defined(POLARSSL_MD_C) )
426 #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites"
429 #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C)
430 #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites"
433 #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \
434 !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
435 !defined(POLARSSL_SSL_PROTO_TLS1_2))
436 #error "POLARSSL_SSL_TLS_C defined, but no protocols are active"
439 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
440 defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1))
441 #error "Illegal protocol selection"
444 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \
445 defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1))
446 #error "Illegal protocol selection"
449 #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \
450 defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \
451 !defined(POLARSSL_SSL_PROTO_TLS1_1)))
452 #error "Illegal protocol selection"
455 #if defined(POLARSSL_SSL_ENCRYPT_THEN_MAC) && \
456 !defined(POLARSSL_SSL_PROTO_TLS1) && \
457 !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
458 !defined(POLARSSL_SSL_PROTO_TLS1_2)
459 #error "POLARSSL_SSL_ENCRYPT_THEN_MAC defined, but not all prerequsites"
462 #if defined(POLARSSL_SSL_EXTENDED_MASTER_SECRET) && \
463 !defined(POLARSSL_SSL_PROTO_TLS1) && \
464 !defined(POLARSSL_SSL_PROTO_TLS1_1) && \
465 !defined(POLARSSL_SSL_PROTO_TLS1_2)
466 #error "POLARSSL_SSL_EXTENDED_MASTER_SECRET defined, but not all prerequsites"
469 #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \
470 ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \
471 !defined(POLARSSL_CIPHER_MODE_CBC) )
472 #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites"
475 #if defined(POLARSSL_SSL_CBC_RECORD_SPLITTING) && \
476 !defined(POLARSSL_SSL_PROTO_SSL3) && !defined(POLARSSL_SSL_PROTO_TLS1)
477 #error "POLARSSL_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites"
480 #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \
481 !defined(POLARSSL_X509_CRT_PARSE_C)
482 #error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites"
485 #if defined(POLARSSL_THREADING_PTHREAD)
486 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
487 #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites"
489 #define POLARSSL_THREADING_IMPL
492 #if defined(POLARSSL_THREADING_ALT)
493 #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL)
494 #error "POLARSSL_THREADING_ALT defined, but not all prerequisites"
496 #define POLARSSL_THREADING_IMPL
499 #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL)
500 #error "POLARSSL_THREADING_C defined, single threading implementation required"
502 #undef POLARSSL_THREADING_IMPL
504 #if defined(POLARSSL_VERSION_FEATURES) && !defined(POLARSSL_VERSION_C)
505 #error "POLARSSL_VERSION_FEATURES defined, but not all prerequisites"
508 #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
509 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \
510 !defined(POLARSSL_PK_PARSE_C) )
511 #error "POLARSSL_X509_USE_C defined, but not all prerequisites"
514 #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \
515 !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \
516 !defined(POLARSSL_PK_WRITE_C) )
517 #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites"
520 #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
521 #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites"
524 #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
525 #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites"
528 #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) )
529 #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites"
532 #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
533 #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites"
536 #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) )
537 #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites"