Digi XBee(R) ANSI C Host Library
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
include
mbedtls
check_config.h
Go to the documentation of this file.
1
6
/*
7
* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
8
* SPDX-License-Identifier: Apache-2.0
9
*
10
* Licensed under the Apache License, Version 2.0 (the "License"); you may
11
* not use this file except in compliance with the License.
12
* You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing, software
17
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
* See the License for the specific language governing permissions and
20
* limitations under the License.
21
*
22
* This file is part of mbed TLS (https://tls.mbed.org)
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 MBEDTLS_CHECK_CONFIG_H
31
#define MBEDTLS_CHECK_CONFIG_H
32
33
/*
34
* We assume CHAR_BIT is 8 in many places. In practice, this is true on our
35
* target platforms, so not an issue, but let's just be extra sure.
36
*/
37
#include <limits.h>
38
#if CHAR_BIT != 8
39
#error "mbed TLS requires a platform with 8-bit chars"
40
#endif
41
42
#if defined(_WIN32)
43
#if !defined(MBEDTLS_PLATFORM_C)
44
#error "MBEDTLS_PLATFORM_C is required on Windows"
45
#endif
46
47
/* Fix the config here. Not convenient to put an #ifdef _WIN32 in config.h as
48
* it would confuse config.pl. */
49
#if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \
50
!defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO)
51
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
52
#endif
53
54
#if !defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT) && \
55
!defined(MBEDTLS_PLATFORM_VSNPRINTF_MACRO)
56
#define MBEDTLS_PLATFORM_VSNPRINTF_ALT
57
#endif
58
#endif
/* _WIN32 */
59
60
#if defined(TARGET_LIKE_MBED) && defined(MBEDTLS_TIMING_C)
61
#error "The TIMING module is not available for mbed OS - please use the timing functions provided by Mbed OS"
62
#endif
63
64
#if defined(MBEDTLS_DEPRECATED_WARNING) && \
65
!defined(__GNUC__) && !defined(__clang__)
66
#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang"
67
#endif
68
69
#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME)
70
#error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense"
71
#endif
72
73
#if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM)
74
#error "MBEDTLS_AESNI_C defined, but not all prerequisites"
75
#endif
76
77
#if defined(MBEDTLS_CTR_DRBG_C) && !defined(MBEDTLS_AES_C)
78
#error "MBEDTLS_CTR_DRBG_C defined, but not all prerequisites"
79
#endif
80
81
#if defined(MBEDTLS_DHM_C) && !defined(MBEDTLS_BIGNUM_C)
82
#error "MBEDTLS_DHM_C defined, but not all prerequisites"
83
#endif
84
85
#if defined(MBEDTLS_CMAC_C) && \
86
!defined(MBEDTLS_AES_C) && !defined(MBEDTLS_DES_C)
87
#error "MBEDTLS_CMAC_C defined, but not all prerequisites"
88
#endif
89
90
#if defined(MBEDTLS_NIST_KW_C) && \
91
( !defined(MBEDTLS_AES_C) || !defined(MBEDTLS_CIPHER_C) )
92
#error "MBEDTLS_NIST_KW_C defined, but not all prerequisites"
93
#endif
94
95
#if defined(MBEDTLS_ECDH_C) && !defined(MBEDTLS_ECP_C)
96
#error "MBEDTLS_ECDH_C defined, but not all prerequisites"
97
#endif
98
99
#if defined(MBEDTLS_ECDSA_C) && \
100
( !defined(MBEDTLS_ECP_C) || \
101
!defined(MBEDTLS_ASN1_PARSE_C) || \
102
!defined(MBEDTLS_ASN1_WRITE_C) )
103
#error "MBEDTLS_ECDSA_C defined, but not all prerequisites"
104
#endif
105
106
#if defined(MBEDTLS_ECJPAKE_C) && \
107
( !defined(MBEDTLS_ECP_C) || !defined(MBEDTLS_MD_C) )
108
#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites"
109
#endif
110
111
#if defined(MBEDTLS_ECP_RESTARTABLE) && \
112
( defined(MBEDTLS_USE_PSA_CRYPTO) || \
113
defined(MBEDTLS_ECDH_COMPUTE_SHARED_ALT) || \
114
defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT) || \
115
defined(MBEDTLS_ECDSA_SIGN_ALT) || \
116
defined(MBEDTLS_ECDSA_VERIFY_ALT) || \
117
defined(MBEDTLS_ECDSA_GENKEY_ALT) || \
118
defined(MBEDTLS_ECP_INTERNAL_ALT) || \
119
defined(MBEDTLS_ECP_ALT) )
120
#error "MBEDTLS_ECP_RESTARTABLE defined, but it cannot coexist with an alternative or PSA-based ECP implementation"
121
#endif
122
123
#if defined(MBEDTLS_ECP_RESTARTABLE) && \
124
! defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
125
#error "MBEDTLS_ECP_RESTARTABLE defined, but not MBEDTLS_ECDH_LEGACY_CONTEXT"
126
#endif
127
128
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED) && \
129
defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
130
#error "MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED defined, but MBEDTLS_ECDH_LEGACY_CONTEXT not disabled"
131
#endif
132
133
#if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C)
134
#error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites"
135
#endif
136
137
#if defined(MBEDTLS_ECP_C) && ( !defined(MBEDTLS_BIGNUM_C) || ( \
138
!defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) && \
139
!defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) && \
140
!defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) && \
141
!defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) && \
142
!defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) && \
143
!defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) && \
144
!defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) && \
145
!defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) && \
146
!defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) && \
147
!defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) && \
148
!defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) ) )
149
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
150
#endif
151
152
#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
153
#error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites"
154
#endif
155
156
#if defined(MBEDTLS_ENTROPY_C) && (!defined(MBEDTLS_SHA512_C) && \
157
!defined(MBEDTLS_SHA256_C))
158
#error "MBEDTLS_ENTROPY_C defined, but not all prerequisites"
159
#endif
160
#if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_SHA512_C) && \
161
defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 64)
162
#error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high"
163
#endif
164
#if defined(MBEDTLS_ENTROPY_C) && \
165
( !defined(MBEDTLS_SHA512_C) || defined(MBEDTLS_ENTROPY_FORCE_SHA256) ) \
166
&& defined(MBEDTLS_CTR_DRBG_ENTROPY_LEN) && (MBEDTLS_CTR_DRBG_ENTROPY_LEN > 32)
167
#error "MBEDTLS_CTR_DRBG_ENTROPY_LEN value too high"
168
#endif
169
#if defined(MBEDTLS_ENTROPY_C) && \
170
defined(MBEDTLS_ENTROPY_FORCE_SHA256) && !defined(MBEDTLS_SHA256_C)
171
#error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
172
#endif
173
174
#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \
175
( !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) )
176
#error "MBEDTLS_TEST_NULL_ENTROPY defined, but not all prerequisites"
177
#endif
178
#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \
179
( defined(MBEDTLS_ENTROPY_NV_SEED) || defined(MBEDTLS_ENTROPY_HARDWARE_ALT) || \
180
defined(MBEDTLS_HAVEGE_C) )
181
#error "MBEDTLS_TEST_NULL_ENTROPY defined, but entropy sources too"
182
#endif
183
184
#if defined(MBEDTLS_GCM_C) && ( \
185
!defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) && !defined(MBEDTLS_ARIA_C) )
186
#error "MBEDTLS_GCM_C defined, but not all prerequisites"
187
#endif
188
189
#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
190
#error "MBEDTLS_ECP_RANDOMIZE_JAC_ALT defined, but not all prerequisites"
191
#endif
192
193
#if defined(MBEDTLS_ECP_ADD_MIXED_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
194
#error "MBEDTLS_ECP_ADD_MIXED_ALT defined, but not all prerequisites"
195
#endif
196
197
#if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
198
#error "MBEDTLS_ECP_DOUBLE_JAC_ALT defined, but not all prerequisites"
199
#endif
200
201
#if defined(MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
202
#error "MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT defined, but not all prerequisites"
203
#endif
204
205
#if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
206
#error "MBEDTLS_ECP_NORMALIZE_JAC_ALT defined, but not all prerequisites"
207
#endif
208
209
#if defined(MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
210
#error "MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT defined, but not all prerequisites"
211
#endif
212
213
#if defined(MBEDTLS_ECP_RANDOMIZE_MXZ_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
214
#error "MBEDTLS_ECP_RANDOMIZE_MXZ_ALT defined, but not all prerequisites"
215
#endif
216
217
#if defined(MBEDTLS_ECP_NORMALIZE_MXZ_ALT) && !defined(MBEDTLS_ECP_INTERNAL_ALT)
218
#error "MBEDTLS_ECP_NORMALIZE_MXZ_ALT defined, but not all prerequisites"
219
#endif
220
221
#if defined(MBEDTLS_HAVEGE_C) && !defined(MBEDTLS_TIMING_C)
222
#error "MBEDTLS_HAVEGE_C defined, but not all prerequisites"
223
#endif
224
225
#if defined(MBEDTLS_HKDF_C) && !defined(MBEDTLS_MD_C)
226
#error "MBEDTLS_HKDF_C defined, but not all prerequisites"
227
#endif
228
229
#if defined(MBEDTLS_HMAC_DRBG_C) && !defined(MBEDTLS_MD_C)
230
#error "MBEDTLS_HMAC_DRBG_C defined, but not all prerequisites"
231
#endif
232
233
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \
234
( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) )
235
#error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites"
236
#endif
237
238
#if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM)
239
#error "MBEDTLS_PADLOCK_C defined, but not all prerequisites"
240
#endif
241
242
#if defined(MBEDTLS_PEM_PARSE_C) && !defined(MBEDTLS_BASE64_C)
243
#error "MBEDTLS_PEM_PARSE_C defined, but not all prerequisites"
244
#endif
245
246
#if defined(MBEDTLS_PEM_WRITE_C) && !defined(MBEDTLS_BASE64_C)
247
#error "MBEDTLS_PEM_WRITE_C defined, but not all prerequisites"
248
#endif
249
250
#if defined(MBEDTLS_PK_C) && \
251
( !defined(MBEDTLS_RSA_C) && !defined(MBEDTLS_ECP_C) )
252
#error "MBEDTLS_PK_C defined, but not all prerequisites"
253
#endif
254
255
#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_PK_C)
256
#error "MBEDTLS_PK_PARSE_C defined, but not all prerequisites"
257
#endif
258
259
#if defined(MBEDTLS_PK_WRITE_C) && !defined(MBEDTLS_PK_C)
260
#error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites"
261
#endif
262
263
#if defined(MBEDTLS_PLATFORM_EXIT_ALT) && !defined(MBEDTLS_PLATFORM_C)
264
#error "MBEDTLS_PLATFORM_EXIT_ALT defined, but not all prerequisites"
265
#endif
266
267
#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) && !defined(MBEDTLS_PLATFORM_C)
268
#error "MBEDTLS_PLATFORM_EXIT_MACRO defined, but not all prerequisites"
269
#endif
270
271
#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) &&\
272
( defined(MBEDTLS_PLATFORM_STD_EXIT) ||\
273
defined(MBEDTLS_PLATFORM_EXIT_ALT) )
274
#error "MBEDTLS_PLATFORM_EXIT_MACRO and MBEDTLS_PLATFORM_STD_EXIT/MBEDTLS_PLATFORM_EXIT_ALT cannot be defined simultaneously"
275
#endif
276
277
#if defined(MBEDTLS_PLATFORM_TIME_ALT) &&\
278
( !defined(MBEDTLS_PLATFORM_C) ||\
279
!defined(MBEDTLS_HAVE_TIME) )
280
#error "MBEDTLS_PLATFORM_TIME_ALT defined, but not all prerequisites"
281
#endif
282
283
#if defined(MBEDTLS_PLATFORM_TIME_MACRO) &&\
284
( !defined(MBEDTLS_PLATFORM_C) ||\
285
!defined(MBEDTLS_HAVE_TIME) )
286
#error "MBEDTLS_PLATFORM_TIME_MACRO defined, but not all prerequisites"
287
#endif
288
289
#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) &&\
290
( !defined(MBEDTLS_PLATFORM_C) ||\
291
!defined(MBEDTLS_HAVE_TIME) )
292
#error "MBEDTLS_PLATFORM_TIME_TYPE_MACRO defined, but not all prerequisites"
293
#endif
294
295
#if defined(MBEDTLS_PLATFORM_TIME_MACRO) &&\
296
( defined(MBEDTLS_PLATFORM_STD_TIME) ||\
297
defined(MBEDTLS_PLATFORM_TIME_ALT) )
298
#error "MBEDTLS_PLATFORM_TIME_MACRO and MBEDTLS_PLATFORM_STD_TIME/MBEDTLS_PLATFORM_TIME_ALT cannot be defined simultaneously"
299
#endif
300
301
#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) &&\
302
( defined(MBEDTLS_PLATFORM_STD_TIME) ||\
303
defined(MBEDTLS_PLATFORM_TIME_ALT) )
304
#error "MBEDTLS_PLATFORM_TIME_TYPE_MACRO and MBEDTLS_PLATFORM_STD_TIME/MBEDTLS_PLATFORM_TIME_ALT cannot be defined simultaneously"
305
#endif
306
307
#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C)
308
#error "MBEDTLS_PLATFORM_FPRINTF_ALT defined, but not all prerequisites"
309
#endif
310
311
#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
312
#error "MBEDTLS_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites"
313
#endif
314
315
#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) &&\
316
( defined(MBEDTLS_PLATFORM_STD_FPRINTF) ||\
317
defined(MBEDTLS_PLATFORM_FPRINTF_ALT) )
318
#error "MBEDTLS_PLATFORM_FPRINTF_MACRO and MBEDTLS_PLATFORM_STD_FPRINTF/MBEDTLS_PLATFORM_FPRINTF_ALT cannot be defined simultaneously"
319
#endif
320
321
#if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\
322
( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) )
323
#error "MBEDTLS_PLATFORM_FREE_MACRO defined, but not all prerequisites"
324
#endif
325
326
#if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\
327
defined(MBEDTLS_PLATFORM_STD_FREE)
328
#error "MBEDTLS_PLATFORM_FREE_MACRO and MBEDTLS_PLATFORM_STD_FREE cannot be defined simultaneously"
329
#endif
330
331
#if defined(MBEDTLS_PLATFORM_FREE_MACRO) && !defined(MBEDTLS_PLATFORM_CALLOC_MACRO)
332
#error "MBEDTLS_PLATFORM_CALLOC_MACRO must be defined if MBEDTLS_PLATFORM_FREE_MACRO is"
333
#endif
334
335
#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\
336
( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) )
337
#error "MBEDTLS_PLATFORM_CALLOC_MACRO defined, but not all prerequisites"
338
#endif
339
340
#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\
341
defined(MBEDTLS_PLATFORM_STD_CALLOC)
342
#error "MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_STD_CALLOC cannot be defined simultaneously"
343
#endif
344
345
#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) && !defined(MBEDTLS_PLATFORM_FREE_MACRO)
346
#error "MBEDTLS_PLATFORM_FREE_MACRO must be defined if MBEDTLS_PLATFORM_CALLOC_MACRO is"
347
#endif
348
349
#if defined(MBEDTLS_PLATFORM_MEMORY) && !defined(MBEDTLS_PLATFORM_C)
350
#error "MBEDTLS_PLATFORM_MEMORY defined, but not all prerequisites"
351
#endif
352
353
#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C)
354
#error "MBEDTLS_PLATFORM_PRINTF_ALT defined, but not all prerequisites"
355
#endif
356
357
#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
358
#error "MBEDTLS_PLATFORM_PRINTF_MACRO defined, but not all prerequisites"
359
#endif
360
361
#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) &&\
362
( defined(MBEDTLS_PLATFORM_STD_PRINTF) ||\
363
defined(MBEDTLS_PLATFORM_PRINTF_ALT) )
364
#error "MBEDTLS_PLATFORM_PRINTF_MACRO and MBEDTLS_PLATFORM_STD_PRINTF/MBEDTLS_PLATFORM_PRINTF_ALT cannot be defined simultaneously"
365
#endif
366
367
#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C)
368
#error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites"
369
#endif
370
371
#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C)
372
#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites"
373
#endif
374
375
#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) &&\
376
( defined(MBEDTLS_PLATFORM_STD_SNPRINTF) ||\
377
defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) )
378
#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously"
379
#endif
380
381
#if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\
382
!defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS)
383
#error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites"
384
#endif
385
386
#if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY)
387
#error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites"
388
#endif
389
390
#if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY)
391
#error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites"
392
#endif
393
394
#if defined(MBEDTLS_PLATFORM_STD_FREE) && !defined(MBEDTLS_PLATFORM_MEMORY)
395
#error "MBEDTLS_PLATFORM_STD_FREE defined, but not all prerequisites"
396
#endif
397
398
#if defined(MBEDTLS_PLATFORM_STD_EXIT) &&\
399
!defined(MBEDTLS_PLATFORM_EXIT_ALT)
400
#error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites"
401
#endif
402
403
#if defined(MBEDTLS_PLATFORM_STD_TIME) &&\
404
( !defined(MBEDTLS_PLATFORM_TIME_ALT) ||\
405
!defined(MBEDTLS_HAVE_TIME) )
406
#error "MBEDTLS_PLATFORM_STD_TIME defined, but not all prerequisites"
407
#endif
408
409
#if defined(MBEDTLS_PLATFORM_STD_FPRINTF) &&\
410
!defined(MBEDTLS_PLATFORM_FPRINTF_ALT)
411
#error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites"
412
#endif
413
414
#if defined(MBEDTLS_PLATFORM_STD_PRINTF) &&\
415
!defined(MBEDTLS_PLATFORM_PRINTF_ALT)
416
#error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites"
417
#endif
418
419
#if defined(MBEDTLS_PLATFORM_STD_SNPRINTF) &&\
420
!defined(MBEDTLS_PLATFORM_SNPRINTF_ALT)
421
#error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites"
422
#endif
423
424
#if defined(MBEDTLS_ENTROPY_NV_SEED) &&\
425
( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_ENTROPY_C) )
426
#error "MBEDTLS_ENTROPY_NV_SEED defined, but not all prerequisites"
427
#endif
428
429
#if defined(MBEDTLS_PLATFORM_NV_SEED_ALT) &&\
430
!defined(MBEDTLS_ENTROPY_NV_SEED)
431
#error "MBEDTLS_PLATFORM_NV_SEED_ALT defined, but not all prerequisites"
432
#endif
433
434
#if defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) &&\
435
!defined(MBEDTLS_PLATFORM_NV_SEED_ALT)
436
#error "MBEDTLS_PLATFORM_STD_NV_SEED_READ defined, but not all prerequisites"
437
#endif
438
439
#if defined(MBEDTLS_PLATFORM_STD_NV_SEED_WRITE) &&\
440
!defined(MBEDTLS_PLATFORM_NV_SEED_ALT)
441
#error "MBEDTLS_PLATFORM_STD_NV_SEED_WRITE defined, but not all prerequisites"
442
#endif
443
444
#if defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO) &&\
445
( defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) ||\
446
defined(MBEDTLS_PLATFORM_NV_SEED_ALT) )
447
#error "MBEDTLS_PLATFORM_NV_SEED_READ_MACRO and MBEDTLS_PLATFORM_STD_NV_SEED_READ cannot be defined simultaneously"
448
#endif
449
450
#if defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO) &&\
451
( defined(MBEDTLS_PLATFORM_STD_NV_SEED_WRITE) ||\
452
defined(MBEDTLS_PLATFORM_NV_SEED_ALT) )
453
#error "MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO and MBEDTLS_PLATFORM_STD_NV_SEED_WRITE cannot be defined simultaneously"
454
#endif
455
456
#if defined(MBEDTLS_PSA_CRYPTO_C) && \
457
!( defined(MBEDTLS_CTR_DRBG_C) && \
458
defined(MBEDTLS_ENTROPY_C) )
459
#error "MBEDTLS_PSA_CRYPTO_C defined, but not all prerequisites"
460
#endif
461
462
#if defined(MBEDTLS_PSA_CRYPTO_SPM) && !defined(MBEDTLS_PSA_CRYPTO_C)
463
#error "MBEDTLS_PSA_CRYPTO_SPM defined, but not all prerequisites"
464
#endif
465
466
#if defined(MBEDTLS_PSA_CRYPTO_SE_C) && \
467
! ( defined(MBEDTLS_PSA_CRYPTO_C) && \
468
defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) )
469
#error "MBEDTLS_PSA_CRYPTO_SE_C defined, but not all prerequisites"
470
#endif
471
472
#if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) && \
473
! defined(MBEDTLS_PSA_CRYPTO_C)
474
#error "MBEDTLS_PSA_CRYPTO_STORAGE_C defined, but not all prerequisites"
475
#endif
476
477
#if defined(MBEDTLS_PSA_INJECT_ENTROPY) && \
478
!( defined(MBEDTLS_PSA_CRYPTO_STORAGE_C) && \
479
defined(MBEDTLS_ENTROPY_NV_SEED) )
480
#error "MBEDTLS_PSA_INJECT_ENTROPY defined, but not all prerequisites"
481
#endif
482
483
#if defined(MBEDTLS_PSA_INJECT_ENTROPY) && \
484
!defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES)
485
#error "MBEDTLS_PSA_INJECT_ENTROPY is not compatible with actual entropy sources"
486
#endif
487
488
#if defined(MBEDTLS_PSA_ITS_FILE_C) && \
489
!defined(MBEDTLS_FS_IO)
490
#error "MBEDTLS_PSA_ITS_FILE_C defined, but not all prerequisites"
491
#endif
492
493
#if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \
494
!defined(MBEDTLS_OID_C) )
495
#error "MBEDTLS_RSA_C defined, but not all prerequisites"
496
#endif
497
498
#if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_PKCS1_V21) && \
499
!defined(MBEDTLS_PKCS1_V15) )
500
#error "MBEDTLS_RSA_C defined, but none of the PKCS1 versions enabled"
501
#endif
502
503
#if defined(MBEDTLS_THREADING_PTHREAD)
504
#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
505
#error "MBEDTLS_THREADING_PTHREAD defined, but not all prerequisites"
506
#endif
507
#define MBEDTLS_THREADING_IMPL
508
#endif
509
510
#if defined(MBEDTLS_THREADING_ALT)
511
#if !defined(MBEDTLS_THREADING_C) || defined(MBEDTLS_THREADING_IMPL)
512
#error "MBEDTLS_THREADING_ALT defined, but not all prerequisites"
513
#endif
514
#define MBEDTLS_THREADING_IMPL
515
#endif
516
517
#if defined(MBEDTLS_THREADING_C) && !defined(MBEDTLS_THREADING_IMPL)
518
#error "MBEDTLS_THREADING_C defined, single threading implementation required"
519
#endif
520
#undef MBEDTLS_THREADING_IMPL
521
522
#if defined(MBEDTLS_USE_PSA_CRYPTO) && !defined(MBEDTLS_PSA_CRYPTO_C)
523
#error "MBEDTLS_USE_PSA_CRYPTO defined, but not all prerequisites"
524
#endif
525
526
#if defined(MBEDTLS_VERSION_FEATURES) && !defined(MBEDTLS_VERSION_C)
527
#error "MBEDTLS_VERSION_FEATURES defined, but not all prerequisites"
528
#endif
529
530
#if defined(MBEDTLS_HAVE_INT32) && defined(MBEDTLS_HAVE_INT64)
531
#error "MBEDTLS_HAVE_INT32 and MBEDTLS_HAVE_INT64 cannot be defined simultaneously"
532
#endif
/* MBEDTLS_HAVE_INT32 && MBEDTLS_HAVE_INT64 */
533
534
#if ( defined(MBEDTLS_HAVE_INT32) || defined(MBEDTLS_HAVE_INT64) ) && \
535
defined(MBEDTLS_HAVE_ASM)
536
#error "MBEDTLS_HAVE_INT32/MBEDTLS_HAVE_INT64 and MBEDTLS_HAVE_ASM cannot be defined simultaneously"
537
#endif
/* (MBEDTLS_HAVE_INT32 || MBEDTLS_HAVE_INT64) && MBEDTLS_HAVE_ASM */
538
539
/*
540
* Avoid warning from -pedantic. This is a convenient place for this
541
* workaround since this is included by every single file before the
542
* #if defined(MBEDTLS_xxx_C) that results in empty translation units.
543
*/
544
typedef
int
mbedtls_iso_c_forbids_empty_translation_units;
545
546
#endif
/* MBEDTLS_CHECK_CONFIG_H */
Generated on Sat Nov 21 2020 22:08:39 for Digi XBee(R) ANSI C Host Library by
1.8.11