Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 1 | /** |
| 2 | * \file check_config.h |
| 3 | * |
| 4 | * \brief Consistency checks for configuration options |
| 5 | * |
Manuel Pégourié-Gonnard | a658a40 | 2015-01-23 09:45:19 +0000 | [diff] [blame] | 6 | * Copyright (C) 2006-2014, ARM Limited, All Rights Reserved |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 7 | * |
Manuel Pégourié-Gonnard | 860b516 | 2015-01-28 17:12:07 +0000 | [diff] [blame] | 8 | * This file is part of mbed TLS (https://polarssl.org) |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 9 | * |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License as published by |
| 12 | * the Free Software Foundation; either version 2 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This program is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License along |
| 21 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 23 | */ |
| 24 | |
| 25 | /* |
| 26 | * It is recommended to include this file from your config.h |
| 27 | * in order to catch dependency issues early. |
| 28 | */ |
| 29 | |
| 30 | #ifndef POLARSSL_CHECK_CONFIG_H |
| 31 | #define POLARSSL_CHECK_CONFIG_H |
| 32 | |
| 33 | #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM) |
| 34 | #error "POLARSSL_AESNI_C defined, but not all prerequisites" |
| 35 | #endif |
| 36 | |
| 37 | #if defined(POLARSSL_CERTS_C) && !defined(POLARSSL_PEM_PARSE_C) |
| 38 | #error "POLARSSL_CERTS_C defined, but not all prerequisites" |
| 39 | #endif |
| 40 | |
| 41 | #if defined(POLARSSL_CTR_DRBG_C) && !defined(POLARSSL_AES_C) |
| 42 | #error "POLARSSL_CTR_DRBG_C defined, but not all prerequisites" |
| 43 | #endif |
| 44 | |
| 45 | #if defined(POLARSSL_DHM_C) && !defined(POLARSSL_BIGNUM_C) |
| 46 | #error "POLARSSL_DHM_C defined, but not all prerequisites" |
| 47 | #endif |
| 48 | |
| 49 | #if defined(POLARSSL_ECDH_C) && !defined(POLARSSL_ECP_C) |
| 50 | #error "POLARSSL_ECDH_C defined, but not all prerequisites" |
| 51 | #endif |
| 52 | |
| 53 | #if defined(POLARSSL_ECDSA_C) && \ |
| 54 | ( !defined(POLARSSL_ECP_C) || \ |
| 55 | !defined(POLARSSL_ASN1_PARSE_C) || \ |
| 56 | !defined(POLARSSL_ASN1_WRITE_C) ) |
| 57 | #error "POLARSSL_ECDSA_C defined, but not all prerequisites" |
| 58 | #endif |
| 59 | |
| 60 | #if defined(POLARSSL_ECDSA_DETERMINISTIC) && !defined(POLARSSL_HMAC_DRBG_C) |
| 61 | #error "POLARSSL_ECDSA_DETERMINISTIC defined, but not all prerequisites" |
| 62 | #endif |
| 63 | |
| 64 | #if defined(POLARSSL_ECP_C) && ( !defined(POLARSSL_BIGNUM_C) || ( \ |
| 65 | !defined(POLARSSL_ECP_DP_SECP192R1_ENABLED) && \ |
| 66 | !defined(POLARSSL_ECP_DP_SECP224R1_ENABLED) && \ |
| 67 | !defined(POLARSSL_ECP_DP_SECP256R1_ENABLED) && \ |
| 68 | !defined(POLARSSL_ECP_DP_SECP384R1_ENABLED) && \ |
| 69 | !defined(POLARSSL_ECP_DP_SECP521R1_ENABLED) && \ |
| 70 | !defined(POLARSSL_ECP_DP_BP256R1_ENABLED) && \ |
| 71 | !defined(POLARSSL_ECP_DP_BP384R1_ENABLED) && \ |
| 72 | !defined(POLARSSL_ECP_DP_BP512R1_ENABLED) && \ |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 73 | !defined(POLARSSL_ECP_DP_SECP192K1_ENABLED) && \ |
| 74 | !defined(POLARSSL_ECP_DP_SECP224K1_ENABLED) && \ |
| 75 | !defined(POLARSSL_ECP_DP_SECP256K1_ENABLED) ) ) |
| 76 | #error "POLARSSL_ECP_C defined, but not all prerequisites" |
| 77 | #endif |
| 78 | |
| 79 | #if defined(POLARSSL_ENTROPY_C) && (!defined(POLARSSL_SHA512_C) && \ |
| 80 | !defined(POLARSSL_SHA256_C)) |
| 81 | #error "POLARSSL_ENTROPY_C defined, but not all prerequisites" |
| 82 | #endif |
| 83 | #if defined(POLARSSL_ENTROPY_C) && defined(POLARSSL_SHA512_C) && \ |
Paul Bakker | 770268f | 2014-05-05 11:40:14 +0200 | [diff] [blame] | 84 | defined(CTR_DRBG_ENTROPY_LEN) && (CTR_DRBG_ENTROPY_LEN > 64) |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 85 | #error "CTR_DRBG_ENTROPY_LEN value too high" |
| 86 | #endif |
| 87 | #if defined(POLARSSL_ENTROPY_C) && \ |
| 88 | ( !defined(POLARSSL_SHA512_C) || defined(POLARSSL_ENTROPY_FORCE_SHA256) ) \ |
Paul Bakker | 770268f | 2014-05-05 11:40:14 +0200 | [diff] [blame] | 89 | && defined(CTR_DRBG_ENTROPY_LEN) && (CTR_DRBG_ENTROPY_LEN > 32) |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 90 | #error "CTR_DRBG_ENTROPY_LEN value too high" |
| 91 | #endif |
| 92 | #if defined(POLARSSL_ENTROPY_C) && \ |
| 93 | defined(POLARSSL_ENTROPY_FORCE_SHA256) && !defined(POLARSSL_SHA256_C) |
| 94 | #error "POLARSSL_ENTROPY_FORCE_SHA256 defined, but not all prerequisites" |
| 95 | #endif |
| 96 | |
| 97 | #if defined(POLARSSL_GCM_C) && ( \ |
| 98 | !defined(POLARSSL_AES_C) && !defined(POLARSSL_CAMELLIA_C) ) |
| 99 | #error "POLARSSL_GCM_C defined, but not all prerequisites" |
| 100 | #endif |
| 101 | |
| 102 | #if defined(POLARSSL_HAVEGE_C) && !defined(POLARSSL_TIMING_C) |
| 103 | #error "POLARSSL_HAVEGE_C defined, but not all prerequisites" |
| 104 | #endif |
| 105 | |
| 106 | #if defined(POLARSSL_HMAC_DRBG) && !defined(POLARSSL_MD_C) |
| 107 | #error "POLARSSL_HMAC_DRBG_C defined, but not all prerequisites" |
| 108 | #endif |
| 109 | |
| 110 | #if defined(POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) && \ |
| 111 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ) |
| 112 | #error "POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED defined, but not all prerequisites" |
| 113 | #endif |
| 114 | |
| 115 | #if defined(POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED) && \ |
| 116 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ) |
| 117 | #error "POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED defined, but not all prerequisites" |
| 118 | #endif |
| 119 | |
| 120 | #if defined(POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED) && !defined(POLARSSL_DHM_C) |
| 121 | #error "POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED defined, but not all prerequisites" |
| 122 | #endif |
| 123 | |
| 124 | #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED) && \ |
| 125 | !defined(POLARSSL_ECDH_C) |
| 126 | #error "POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED defined, but not all prerequisites" |
| 127 | #endif |
| 128 | |
| 129 | #if defined(POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED) && \ |
| 130 | ( !defined(POLARSSL_DHM_C) || !defined(POLARSSL_RSA_C) || \ |
| 131 | !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) ) |
| 132 | #error "POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED defined, but not all prerequisites" |
| 133 | #endif |
| 134 | |
| 135 | #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED) && \ |
| 136 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_RSA_C) || \ |
| 137 | !defined(POLARSSL_X509_CRT_PARSE_C) || !defined(POLARSSL_PKCS1_V15) ) |
| 138 | #error "POLARSSL_KEY_EXCHANGE_ECDHE_RSA_ENABLED defined, but not all prerequisites" |
| 139 | #endif |
| 140 | |
| 141 | #if defined(POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) && \ |
| 142 | ( !defined(POLARSSL_ECDH_C) || !defined(POLARSSL_ECDSA_C) || \ |
| 143 | !defined(POLARSSL_X509_CRT_PARSE_C) ) |
| 144 | #error "POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED defined, but not all prerequisites" |
| 145 | #endif |
| 146 | |
| 147 | #if defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED) && \ |
| 148 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\ |
| 149 | !defined(POLARSSL_PKCS1_V15) ) |
| 150 | #error "POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED defined, but not all prerequisites" |
| 151 | #endif |
| 152 | |
| 153 | #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) && \ |
| 154 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_X509_CRT_PARSE_C) ||\ |
| 155 | !defined(POLARSSL_PKCS1_V15) ) |
| 156 | #error "POLARSSL_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" |
| 157 | #endif |
| 158 | |
Manuel Pégourié-Gonnard | 0a155b8 | 2015-01-23 17:28:27 +0000 | [diff] [blame] | 159 | #if defined(POLARSSL_MEMORY_C) && !defined(POLARSSL_PLATFORM_C) |
| 160 | #error "POLARSSL_MEMORY_C defined, but not all prerequisites" |
| 161 | #endif |
| 162 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 163 | #if defined(POLARSSL_MEMORY_BUFFER_ALLOC_C) && \ |
| 164 | ( !defined(POLARSSL_PLATFORM_C) || !defined(POLARSSL_PLATFORM_MEMORY) ) |
| 165 | #error "POLARSSL_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" |
| 166 | #endif |
| 167 | |
| 168 | #if defined(POLARSSL_PADLOCK_C) && !defined(POLARSSL_HAVE_ASM) |
| 169 | #error "POLARSSL_PADLOCK_C defined, but not all prerequisites" |
| 170 | #endif |
| 171 | |
| 172 | #if defined(POLARSSL_PBKDF2_C) && !defined(POLARSSL_MD_C) |
| 173 | #error "POLARSSL_PBKDF2_C defined, but not all prerequisites" |
| 174 | #endif |
| 175 | |
| 176 | #if defined(POLARSSL_PEM_PARSE_C) && !defined(POLARSSL_BASE64_C) |
| 177 | #error "POLARSSL_PEM_PARSE_C defined, but not all prerequisites" |
| 178 | #endif |
| 179 | |
| 180 | #if defined(POLARSSL_PEM_WRITE_C) && !defined(POLARSSL_BASE64_C) |
| 181 | #error "POLARSSL_PEM_WRITE_C defined, but not all prerequisites" |
| 182 | #endif |
| 183 | |
Manuel Pégourié-Gonnard | 94de331 | 2015-01-28 16:32:36 +0000 | [diff] [blame] | 184 | #if defined(POLARSSL_PK_C) && \ |
| 185 | ( !defined(POLARSSL_RSA_C) && !defined(POLARSSL_ECP_C) ) |
| 186 | #error "POLARSSL_PK_C defined, but not all prerequisites" |
| 187 | #endif |
| 188 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 189 | #if defined(POLARSSL_PK_PARSE_C) && !defined(POLARSSL_PK_C) |
| 190 | #error "POLARSSL_PK_PARSE_C defined, but not all prerequisites" |
| 191 | #endif |
| 192 | |
| 193 | #if defined(POLARSSL_PK_WRITE_C) && !defined(POLARSSL_PK_C) |
| 194 | #error "POLARSSL_PK_WRITE_C defined, but not all prerequisites" |
| 195 | #endif |
| 196 | |
| 197 | #if defined(POLARSSL_PKCS11_C) && !defined(POLARSSL_PK_C) |
| 198 | #error "POLARSSL_PKCS11_C defined, but not all prerequisites" |
| 199 | #endif |
| 200 | |
Rich Evans | 46b0a8d | 2015-01-30 10:47:32 +0000 | [diff] [blame^] | 201 | #if defined(POLARSSL_PLATFORM_SNPRINTF_ALT) && ( defined(_WIN32)\ |
| 202 | && !defined(EFIX64) && !defined(EFI32) ) |
| 203 | #error "POLARSSL_PLATFORM_SNPRINTF_ALT defined but not available on Windows" |
| 204 | #endif |
| 205 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 206 | #if defined(POLARSSL_RSA_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 207 | !defined(POLARSSL_OID_C) ) |
| 208 | #error "POLARSSL_RSA_C defined, but not all prerequisites" |
| 209 | #endif |
| 210 | |
Manuel Pégourié-Gonnard | d1539b1 | 2014-06-06 16:42:37 +0200 | [diff] [blame] | 211 | #if defined(POLARSSL_X509_RSASSA_PSS_SUPPORT) && \ |
Manuel Pégourié-Gonnard | 9df5c96 | 2014-01-24 14:37:29 +0100 | [diff] [blame] | 212 | ( !defined(POLARSSL_RSA_C) || !defined(POLARSSL_PKCS1_V21) ) |
Manuel Pégourié-Gonnard | d1539b1 | 2014-06-06 16:42:37 +0200 | [diff] [blame] | 213 | #error "POLARSSL_X509_RSASSA_PSS_SUPPORT defined, but not all prerequisites" |
Manuel Pégourié-Gonnard | 9df5c96 | 2014-01-24 14:37:29 +0100 | [diff] [blame] | 214 | #endif |
| 215 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 216 | #if defined(POLARSSL_SSL_PROTO_SSL3) && ( !defined(POLARSSL_MD5_C) || \ |
| 217 | !defined(POLARSSL_SHA1_C) ) |
| 218 | #error "POLARSSL_SSL_PROTO_SSL3 defined, but not all prerequisites" |
| 219 | #endif |
| 220 | |
| 221 | #if defined(POLARSSL_SSL_PROTO_TLS1) && ( !defined(POLARSSL_MD5_C) || \ |
| 222 | !defined(POLARSSL_SHA1_C) ) |
| 223 | #error "POLARSSL_SSL_PROTO_TLS1 defined, but not all prerequisites" |
| 224 | #endif |
| 225 | |
| 226 | #if defined(POLARSSL_SSL_PROTO_TLS1_1) && ( !defined(POLARSSL_MD5_C) || \ |
| 227 | !defined(POLARSSL_SHA1_C) ) |
| 228 | #error "POLARSSL_SSL_PROTO_TLS1_1 defined, but not all prerequisites" |
| 229 | #endif |
| 230 | |
| 231 | #if defined(POLARSSL_SSL_PROTO_TLS1_2) && ( !defined(POLARSSL_SHA1_C) && \ |
| 232 | !defined(POLARSSL_SHA256_C) && !defined(POLARSSL_SHA512_C) ) |
| 233 | #error "POLARSSL_SSL_PROTO_TLS1_2 defined, but not all prerequisites" |
| 234 | #endif |
| 235 | |
| 236 | #if defined(POLARSSL_SSL_CLI_C) && !defined(POLARSSL_SSL_TLS_C) |
| 237 | #error "POLARSSL_SSL_CLI_C defined, but not all prerequisites" |
| 238 | #endif |
| 239 | |
| 240 | #if defined(POLARSSL_SSL_TLS_C) && ( !defined(POLARSSL_CIPHER_C) || \ |
| 241 | !defined(POLARSSL_MD_C) ) |
| 242 | #error "POLARSSL_SSL_TLS_C defined, but not all prerequisites" |
| 243 | #endif |
| 244 | |
| 245 | #if defined(POLARSSL_SSL_SRV_C) && !defined(POLARSSL_SSL_TLS_C) |
| 246 | #error "POLARSSL_SSL_SRV_C defined, but not all prerequisites" |
| 247 | #endif |
| 248 | |
| 249 | #if defined(POLARSSL_SSL_TLS_C) && (!defined(POLARSSL_SSL_PROTO_SSL3) && \ |
| 250 | !defined(POLARSSL_SSL_PROTO_TLS1) && !defined(POLARSSL_SSL_PROTO_TLS1_1) && \ |
| 251 | !defined(POLARSSL_SSL_PROTO_TLS1_2)) |
| 252 | #error "POLARSSL_SSL_TLS_C defined, but no protocols are active" |
| 253 | #endif |
| 254 | |
| 255 | #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \ |
| 256 | defined(POLARSSL_SSL_PROTO_TLS1_1) && !defined(POLARSSL_SSL_PROTO_TLS1)) |
| 257 | #error "Illegal protocol selection" |
| 258 | #endif |
| 259 | |
| 260 | #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_TLS1) && \ |
| 261 | defined(POLARSSL_SSL_PROTO_TLS1_2) && !defined(POLARSSL_SSL_PROTO_TLS1_1)) |
| 262 | #error "Illegal protocol selection" |
| 263 | #endif |
| 264 | |
| 265 | #if defined(POLARSSL_SSL_TLS_C) && (defined(POLARSSL_SSL_PROTO_SSL3) && \ |
| 266 | defined(POLARSSL_SSL_PROTO_TLS1_2) && (!defined(POLARSSL_SSL_PROTO_TLS1) || \ |
| 267 | !defined(POLARSSL_SSL_PROTO_TLS1_1))) |
| 268 | #error "Illegal protocol selection" |
| 269 | #endif |
| 270 | |
Manuel Pégourié-Gonnard | 699cafa | 2014-10-27 13:57:03 +0100 | [diff] [blame] | 271 | #if defined(POLARSSL_SSL_ENCRYPT_THEN_MAC) && \ |
| 272 | !defined(POLARSSL_SSL_PROTO_TLS1) && \ |
| 273 | !defined(POLARSSL_SSL_PROTO_TLS1_1) && \ |
| 274 | !defined(POLARSSL_SSL_PROTO_TLS1_2) |
| 275 | #error "POLARSSL_SSL_ENCRYPT_THEN_MAC defined, but not all prerequsites" |
| 276 | #endif |
| 277 | |
Manuel Pégourié-Gonnard | 769c6b6 | 2014-10-28 14:13:55 +0100 | [diff] [blame] | 278 | #if defined(POLARSSL_SSL_EXTENDED_MASTER_SECRET) && \ |
| 279 | !defined(POLARSSL_SSL_PROTO_TLS1) && \ |
| 280 | !defined(POLARSSL_SSL_PROTO_TLS1_1) && \ |
| 281 | !defined(POLARSSL_SSL_PROTO_TLS1_2) |
| 282 | #error "POLARSSL_SSL_EXTENDED_MASTER_SECRET defined, but not all prerequsites" |
| 283 | #endif |
| 284 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 285 | #if defined(POLARSSL_SSL_SESSION_TICKETS) && defined(POLARSSL_SSL_TLS_C) && \ |
| 286 | ( !defined(POLARSSL_AES_C) || !defined(POLARSSL_SHA256_C) || \ |
| 287 | !defined(POLARSSL_CIPHER_MODE_CBC) ) |
| 288 | #error "POLARSSL_SSL_SESSION_TICKETS_C defined, but not all prerequisites" |
| 289 | #endif |
| 290 | |
Manuel Pégourié-Gonnard | d76314c | 2015-01-07 12:39:44 +0100 | [diff] [blame] | 291 | #if defined(POLARSSL_SSL_CBC_RECORD_SPLITTING) && \ |
| 292 | !defined(POLARSSL_SSL_PROTO_SSL3) && !defined(POLARSSL_SSL_PROTO_TLS1) |
| 293 | #error "POLARSSL_SSL_CBC_RECORD_SPLITTING defined, but not all prerequisites" |
| 294 | #endif |
| 295 | |
Manuel Pégourié-Gonnard | 14d5595 | 2014-04-30 12:35:08 +0200 | [diff] [blame] | 296 | #if defined(POLARSSL_SSL_SERVER_NAME_INDICATION) && \ |
| 297 | !defined(POLARSSL_X509_CRT_PARSE_C) |
| 298 | #error "POLARSSL_SSL_SERVER_NAME_INDICATION defined, but not all prerequisites" |
| 299 | #endif |
| 300 | |
| 301 | #if defined(POLARSSL_THREADING_PTHREAD) |
| 302 | #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL) |
| 303 | #error "POLARSSL_THREADING_PTHREAD defined, but not all prerequisites" |
| 304 | #endif |
| 305 | #define POLARSSL_THREADING_IMPL |
| 306 | #endif |
| 307 | |
| 308 | #if defined(POLARSSL_THREADING_ALT) |
| 309 | #if !defined(POLARSSL_THREADING_C) || defined(POLARSSL_THREADING_IMPL) |
| 310 | #error "POLARSSL_THREADING_ALT defined, but not all prerequisites" |
| 311 | #endif |
| 312 | #define POLARSSL_THREADING_IMPL |
| 313 | #endif |
| 314 | |
| 315 | #if defined(POLARSSL_THREADING_C) && !defined(POLARSSL_THREADING_IMPL) |
| 316 | #error "POLARSSL_THREADING_C defined, single threading implementation required" |
| 317 | #endif |
| 318 | #undef POLARSSL_THREADING_IMPL |
| 319 | |
| 320 | #if defined(POLARSSL_VERSION_FEATURES) && !defined(POLARSSL_VERSION_C) |
| 321 | #error "POLARSSL_VERSION_FEATURES defined, but not all prerequisites" |
| 322 | #endif |
| 323 | |
| 324 | #if defined(POLARSSL_X509_USE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 325 | !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_PARSE_C) || \ |
| 326 | !defined(POLARSSL_PK_PARSE_C) ) |
| 327 | #error "POLARSSL_X509_USE_C defined, but not all prerequisites" |
| 328 | #endif |
| 329 | |
| 330 | #if defined(POLARSSL_X509_CREATE_C) && ( !defined(POLARSSL_BIGNUM_C) || \ |
| 331 | !defined(POLARSSL_OID_C) || !defined(POLARSSL_ASN1_WRITE_C) || \ |
| 332 | !defined(POLARSSL_PK_WRITE_C) ) |
| 333 | #error "POLARSSL_X509_CREATE_C defined, but not all prerequisites" |
| 334 | #endif |
| 335 | |
| 336 | #if defined(POLARSSL_X509_CRT_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) ) |
| 337 | #error "POLARSSL_X509_CRT_PARSE_C defined, but not all prerequisites" |
| 338 | #endif |
| 339 | |
| 340 | #if defined(POLARSSL_X509_CRL_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) ) |
| 341 | #error "POLARSSL_X509_CRL_PARSE_C defined, but not all prerequisites" |
| 342 | #endif |
| 343 | |
| 344 | #if defined(POLARSSL_X509_CSR_PARSE_C) && ( !defined(POLARSSL_X509_USE_C) ) |
| 345 | #error "POLARSSL_X509_CSR_PARSE_C defined, but not all prerequisites" |
| 346 | #endif |
| 347 | |
| 348 | #if defined(POLARSSL_X509_CRT_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) ) |
| 349 | #error "POLARSSL_X509_CRT_WRITE_C defined, but not all prerequisites" |
| 350 | #endif |
| 351 | |
| 352 | #if defined(POLARSSL_X509_CSR_WRITE_C) && ( !defined(POLARSSL_X509_CREATE_C) ) |
| 353 | #error "POLARSSL_X509_CSR_WRITE_C defined, but not all prerequisites" |
| 354 | #endif |
| 355 | |
| 356 | #endif /* POLARSSL_CHECK_CONFIG_H */ |