1 /*
2  *  Version feature information
3  *
4  *  Copyright The Mbed TLS Contributors
5  *  SPDX-License-Identifier: Apache-2.0
6  *
7  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
8  *  not use this file except in compliance with the License.
9  *  You may obtain a copy of the License at
10  *
11  *  http://www.apache.org/licenses/LICENSE-2.0
12  *
13  *  Unless required by applicable law or agreed to in writing, software
14  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  *  See the License for the specific language governing permissions and
17  *  limitations under the License.
18  */
19 
20 #include "common.h"
21 
22 #if defined(MBEDTLS_VERSION_C)
23 
24 #include "mbedtls/version.h"
25 
26 #include <string.h>
27 
28 static const char * const features[] = {
29 #if defined(MBEDTLS_VERSION_FEATURES)
30 #if defined(MBEDTLS_HAVE_ASM)
31     "MBEDTLS_HAVE_ASM",
32 #endif /* MBEDTLS_HAVE_ASM */
33 #if defined(MBEDTLS_NO_UDBL_DIVISION)
34     "MBEDTLS_NO_UDBL_DIVISION",
35 #endif /* MBEDTLS_NO_UDBL_DIVISION */
36 #if defined(MBEDTLS_NO_64BIT_MULTIPLICATION)
37     "MBEDTLS_NO_64BIT_MULTIPLICATION",
38 #endif /* MBEDTLS_NO_64BIT_MULTIPLICATION */
39 #if defined(MBEDTLS_HAVE_SSE2)
40     "MBEDTLS_HAVE_SSE2",
41 #endif /* MBEDTLS_HAVE_SSE2 */
42 #if defined(MBEDTLS_HAVE_TIME)
43     "MBEDTLS_HAVE_TIME",
44 #endif /* MBEDTLS_HAVE_TIME */
45 #if defined(MBEDTLS_HAVE_TIME_DATE)
46     "MBEDTLS_HAVE_TIME_DATE",
47 #endif /* MBEDTLS_HAVE_TIME_DATE */
48 #if defined(MBEDTLS_PLATFORM_MEMORY)
49     "MBEDTLS_PLATFORM_MEMORY",
50 #endif /* MBEDTLS_PLATFORM_MEMORY */
51 #if defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS)
52     "MBEDTLS_PLATFORM_NO_STD_FUNCTIONS",
53 #endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */
54 #if defined(MBEDTLS_PLATFORM_SETBUF_ALT)
55     "MBEDTLS_PLATFORM_SETBUF_ALT",
56 #endif /* MBEDTLS_PLATFORM_SETBUF_ALT */
57 #if defined(MBEDTLS_PLATFORM_EXIT_ALT)
58     "MBEDTLS_PLATFORM_EXIT_ALT",
59 #endif /* MBEDTLS_PLATFORM_EXIT_ALT */
60 #if defined(MBEDTLS_PLATFORM_TIME_ALT)
61     "MBEDTLS_PLATFORM_TIME_ALT",
62 #endif /* MBEDTLS_PLATFORM_TIME_ALT */
63 #if defined(MBEDTLS_PLATFORM_FPRINTF_ALT)
64     "MBEDTLS_PLATFORM_FPRINTF_ALT",
65 #endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */
66 #if defined(MBEDTLS_PLATFORM_PRINTF_ALT)
67     "MBEDTLS_PLATFORM_PRINTF_ALT",
68 #endif /* MBEDTLS_PLATFORM_PRINTF_ALT */
69 #if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT)
70     "MBEDTLS_PLATFORM_SNPRINTF_ALT",
71 #endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */
72 #if defined(MBEDTLS_PLATFORM_VSNPRINTF_ALT)
73     "MBEDTLS_PLATFORM_VSNPRINTF_ALT",
74 #endif /* MBEDTLS_PLATFORM_VSNPRINTF_ALT */
75 #if defined(MBEDTLS_PLATFORM_NV_SEED_ALT)
76     "MBEDTLS_PLATFORM_NV_SEED_ALT",
77 #endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */
78 #if defined(MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT)
79     "MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT",
80 #endif /* MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT */
81 #if defined(MBEDTLS_DEPRECATED_WARNING)
82     "MBEDTLS_DEPRECATED_WARNING",
83 #endif /* MBEDTLS_DEPRECATED_WARNING */
84 #if defined(MBEDTLS_DEPRECATED_REMOVED)
85     "MBEDTLS_DEPRECATED_REMOVED",
86 #endif /* MBEDTLS_DEPRECATED_REMOVED */
87 #if defined(MBEDTLS_TIMING_ALT)
88     "MBEDTLS_TIMING_ALT",
89 #endif /* MBEDTLS_TIMING_ALT */
90 #if defined(MBEDTLS_AES_ALT)
91     "MBEDTLS_AES_ALT",
92 #endif /* MBEDTLS_AES_ALT */
93 #if defined(MBEDTLS_ARIA_ALT)
94     "MBEDTLS_ARIA_ALT",
95 #endif /* MBEDTLS_ARIA_ALT */
96 #if defined(MBEDTLS_CAMELLIA_ALT)
97     "MBEDTLS_CAMELLIA_ALT",
98 #endif /* MBEDTLS_CAMELLIA_ALT */
99 #if defined(MBEDTLS_CCM_ALT)
100     "MBEDTLS_CCM_ALT",
101 #endif /* MBEDTLS_CCM_ALT */
102 #if defined(MBEDTLS_CHACHA20_ALT)
103     "MBEDTLS_CHACHA20_ALT",
104 #endif /* MBEDTLS_CHACHA20_ALT */
105 #if defined(MBEDTLS_CHACHAPOLY_ALT)
106     "MBEDTLS_CHACHAPOLY_ALT",
107 #endif /* MBEDTLS_CHACHAPOLY_ALT */
108 #if defined(MBEDTLS_CMAC_ALT)
109     "MBEDTLS_CMAC_ALT",
110 #endif /* MBEDTLS_CMAC_ALT */
111 #if defined(MBEDTLS_DES_ALT)
112     "MBEDTLS_DES_ALT",
113 #endif /* MBEDTLS_DES_ALT */
114 #if defined(MBEDTLS_DHM_ALT)
115     "MBEDTLS_DHM_ALT",
116 #endif /* MBEDTLS_DHM_ALT */
117 #if defined(MBEDTLS_ECJPAKE_ALT)
118     "MBEDTLS_ECJPAKE_ALT",
119 #endif /* MBEDTLS_ECJPAKE_ALT */
120 #if defined(MBEDTLS_GCM_ALT)
121     "MBEDTLS_GCM_ALT",
122 #endif /* MBEDTLS_GCM_ALT */
123 #if defined(MBEDTLS_NIST_KW_ALT)
124     "MBEDTLS_NIST_KW_ALT",
125 #endif /* MBEDTLS_NIST_KW_ALT */
126 #if defined(MBEDTLS_MD5_ALT)
127     "MBEDTLS_MD5_ALT",
128 #endif /* MBEDTLS_MD5_ALT */
129 #if defined(MBEDTLS_POLY1305_ALT)
130     "MBEDTLS_POLY1305_ALT",
131 #endif /* MBEDTLS_POLY1305_ALT */
132 #if defined(MBEDTLS_RIPEMD160_ALT)
133     "MBEDTLS_RIPEMD160_ALT",
134 #endif /* MBEDTLS_RIPEMD160_ALT */
135 #if defined(MBEDTLS_RSA_ALT)
136     "MBEDTLS_RSA_ALT",
137 #endif /* MBEDTLS_RSA_ALT */
138 #if defined(MBEDTLS_SHA1_ALT)
139     "MBEDTLS_SHA1_ALT",
140 #endif /* MBEDTLS_SHA1_ALT */
141 #if defined(MBEDTLS_SHA256_ALT)
142     "MBEDTLS_SHA256_ALT",
143 #endif /* MBEDTLS_SHA256_ALT */
144 #if defined(MBEDTLS_SHA512_ALT)
145     "MBEDTLS_SHA512_ALT",
146 #endif /* MBEDTLS_SHA512_ALT */
147 #if defined(MBEDTLS_ECP_ALT)
148     "MBEDTLS_ECP_ALT",
149 #endif /* MBEDTLS_ECP_ALT */
150 #if defined(MBEDTLS_MD5_PROCESS_ALT)
151     "MBEDTLS_MD5_PROCESS_ALT",
152 #endif /* MBEDTLS_MD5_PROCESS_ALT */
153 #if defined(MBEDTLS_RIPEMD160_PROCESS_ALT)
154     "MBEDTLS_RIPEMD160_PROCESS_ALT",
155 #endif /* MBEDTLS_RIPEMD160_PROCESS_ALT */
156 #if defined(MBEDTLS_SHA1_PROCESS_ALT)
157     "MBEDTLS_SHA1_PROCESS_ALT",
158 #endif /* MBEDTLS_SHA1_PROCESS_ALT */
159 #if defined(MBEDTLS_SHA256_PROCESS_ALT)
160     "MBEDTLS_SHA256_PROCESS_ALT",
161 #endif /* MBEDTLS_SHA256_PROCESS_ALT */
162 #if defined(MBEDTLS_SHA512_PROCESS_ALT)
163     "MBEDTLS_SHA512_PROCESS_ALT",
164 #endif /* MBEDTLS_SHA512_PROCESS_ALT */
165 #if defined(MBEDTLS_DES_SETKEY_ALT)
166     "MBEDTLS_DES_SETKEY_ALT",
167 #endif /* MBEDTLS_DES_SETKEY_ALT */
168 #if defined(MBEDTLS_DES_CRYPT_ECB_ALT)
169     "MBEDTLS_DES_CRYPT_ECB_ALT",
170 #endif /* MBEDTLS_DES_CRYPT_ECB_ALT */
171 #if defined(MBEDTLS_DES3_CRYPT_ECB_ALT)
172     "MBEDTLS_DES3_CRYPT_ECB_ALT",
173 #endif /* MBEDTLS_DES3_CRYPT_ECB_ALT */
174 #if defined(MBEDTLS_AES_SETKEY_ENC_ALT)
175     "MBEDTLS_AES_SETKEY_ENC_ALT",
176 #endif /* MBEDTLS_AES_SETKEY_ENC_ALT */
177 #if defined(MBEDTLS_AES_SETKEY_DEC_ALT)
178     "MBEDTLS_AES_SETKEY_DEC_ALT",
179 #endif /* MBEDTLS_AES_SETKEY_DEC_ALT */
180 #if defined(MBEDTLS_AES_ENCRYPT_ALT)
181     "MBEDTLS_AES_ENCRYPT_ALT",
182 #endif /* MBEDTLS_AES_ENCRYPT_ALT */
183 #if defined(MBEDTLS_AES_DECRYPT_ALT)
184     "MBEDTLS_AES_DECRYPT_ALT",
185 #endif /* MBEDTLS_AES_DECRYPT_ALT */
186 #if defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
187     "MBEDTLS_ECDH_GEN_PUBLIC_ALT",
188 #endif /* MBEDTLS_ECDH_GEN_PUBLIC_ALT */
189 #if defined(MBEDTLS_ECDH_COMPUTE_SHARED_ALT)
190     "MBEDTLS_ECDH_COMPUTE_SHARED_ALT",
191 #endif /* MBEDTLS_ECDH_COMPUTE_SHARED_ALT */
192 #if defined(MBEDTLS_ECDSA_VERIFY_ALT)
193     "MBEDTLS_ECDSA_VERIFY_ALT",
194 #endif /* MBEDTLS_ECDSA_VERIFY_ALT */
195 #if defined(MBEDTLS_ECDSA_SIGN_ALT)
196     "MBEDTLS_ECDSA_SIGN_ALT",
197 #endif /* MBEDTLS_ECDSA_SIGN_ALT */
198 #if defined(MBEDTLS_ECDSA_GENKEY_ALT)
199     "MBEDTLS_ECDSA_GENKEY_ALT",
200 #endif /* MBEDTLS_ECDSA_GENKEY_ALT */
201 #if defined(MBEDTLS_ECP_INTERNAL_ALT)
202     "MBEDTLS_ECP_INTERNAL_ALT",
203 #endif /* MBEDTLS_ECP_INTERNAL_ALT */
204 #if defined(MBEDTLS_ECP_NO_FALLBACK)
205     "MBEDTLS_ECP_NO_FALLBACK",
206 #endif /* MBEDTLS_ECP_NO_FALLBACK */
207 #if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT)
208     "MBEDTLS_ECP_RANDOMIZE_JAC_ALT",
209 #endif /* MBEDTLS_ECP_RANDOMIZE_JAC_ALT */
210 #if defined(MBEDTLS_ECP_ADD_MIXED_ALT)
211     "MBEDTLS_ECP_ADD_MIXED_ALT",
212 #endif /* MBEDTLS_ECP_ADD_MIXED_ALT */
213 #if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT)
214     "MBEDTLS_ECP_DOUBLE_JAC_ALT",
215 #endif /* MBEDTLS_ECP_DOUBLE_JAC_ALT */
216 #if defined(MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT)
217     "MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT",
218 #endif /* MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT */
219 #if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT)
220     "MBEDTLS_ECP_NORMALIZE_JAC_ALT",
221 #endif /* MBEDTLS_ECP_NORMALIZE_JAC_ALT */
222 #if defined(MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT)
223     "MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT",
224 #endif /* MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT */
225 #if defined(MBEDTLS_ECP_RANDOMIZE_MXZ_ALT)
226     "MBEDTLS_ECP_RANDOMIZE_MXZ_ALT",
227 #endif /* MBEDTLS_ECP_RANDOMIZE_MXZ_ALT */
228 #if defined(MBEDTLS_ECP_NORMALIZE_MXZ_ALT)
229     "MBEDTLS_ECP_NORMALIZE_MXZ_ALT",
230 #endif /* MBEDTLS_ECP_NORMALIZE_MXZ_ALT */
231 #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
232     "MBEDTLS_ENTROPY_HARDWARE_ALT",
233 #endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */
234 #if defined(MBEDTLS_AES_ROM_TABLES)
235     "MBEDTLS_AES_ROM_TABLES",
236 #endif /* MBEDTLS_AES_ROM_TABLES */
237 #if defined(MBEDTLS_AES_FEWER_TABLES)
238     "MBEDTLS_AES_FEWER_TABLES",
239 #endif /* MBEDTLS_AES_FEWER_TABLES */
240 #if defined(MBEDTLS_CAMELLIA_SMALL_MEMORY)
241     "MBEDTLS_CAMELLIA_SMALL_MEMORY",
242 #endif /* MBEDTLS_CAMELLIA_SMALL_MEMORY */
243 #if defined(MBEDTLS_CHECK_RETURN_WARNING)
244     "MBEDTLS_CHECK_RETURN_WARNING",
245 #endif /* MBEDTLS_CHECK_RETURN_WARNING */
246 #if defined(MBEDTLS_CIPHER_MODE_CBC)
247     "MBEDTLS_CIPHER_MODE_CBC",
248 #endif /* MBEDTLS_CIPHER_MODE_CBC */
249 #if defined(MBEDTLS_CIPHER_MODE_CFB)
250     "MBEDTLS_CIPHER_MODE_CFB",
251 #endif /* MBEDTLS_CIPHER_MODE_CFB */
252 #if defined(MBEDTLS_CIPHER_MODE_CTR)
253     "MBEDTLS_CIPHER_MODE_CTR",
254 #endif /* MBEDTLS_CIPHER_MODE_CTR */
255 #if defined(MBEDTLS_CIPHER_MODE_OFB)
256     "MBEDTLS_CIPHER_MODE_OFB",
257 #endif /* MBEDTLS_CIPHER_MODE_OFB */
258 #if defined(MBEDTLS_CIPHER_MODE_XTS)
259     "MBEDTLS_CIPHER_MODE_XTS",
260 #endif /* MBEDTLS_CIPHER_MODE_XTS */
261 #if defined(MBEDTLS_CIPHER_NULL_CIPHER)
262     "MBEDTLS_CIPHER_NULL_CIPHER",
263 #endif /* MBEDTLS_CIPHER_NULL_CIPHER */
264 #if defined(MBEDTLS_CIPHER_PADDING_PKCS7)
265     "MBEDTLS_CIPHER_PADDING_PKCS7",
266 #endif /* MBEDTLS_CIPHER_PADDING_PKCS7 */
267 #if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS)
268     "MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS",
269 #endif /* MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS */
270 #if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN)
271     "MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN",
272 #endif /* MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN */
273 #if defined(MBEDTLS_CIPHER_PADDING_ZEROS)
274     "MBEDTLS_CIPHER_PADDING_ZEROS",
275 #endif /* MBEDTLS_CIPHER_PADDING_ZEROS */
276 #if defined(MBEDTLS_CTR_DRBG_USE_128_BIT_KEY)
277     "MBEDTLS_CTR_DRBG_USE_128_BIT_KEY",
278 #endif /* MBEDTLS_CTR_DRBG_USE_128_BIT_KEY */
279 #if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
280     "MBEDTLS_ECP_DP_SECP192R1_ENABLED",
281 #endif /* MBEDTLS_ECP_DP_SECP192R1_ENABLED */
282 #if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
283     "MBEDTLS_ECP_DP_SECP224R1_ENABLED",
284 #endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */
285 #if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
286     "MBEDTLS_ECP_DP_SECP256R1_ENABLED",
287 #endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED */
288 #if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
289     "MBEDTLS_ECP_DP_SECP384R1_ENABLED",
290 #endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */
291 #if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
292     "MBEDTLS_ECP_DP_SECP521R1_ENABLED",
293 #endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */
294 #if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
295     "MBEDTLS_ECP_DP_SECP192K1_ENABLED",
296 #endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */
297 #if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
298     "MBEDTLS_ECP_DP_SECP224K1_ENABLED",
299 #endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */
300 #if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
301     "MBEDTLS_ECP_DP_SECP256K1_ENABLED",
302 #endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */
303 #if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)
304     "MBEDTLS_ECP_DP_BP256R1_ENABLED",
305 #endif /* MBEDTLS_ECP_DP_BP256R1_ENABLED */
306 #if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED)
307     "MBEDTLS_ECP_DP_BP384R1_ENABLED",
308 #endif /* MBEDTLS_ECP_DP_BP384R1_ENABLED */
309 #if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED)
310     "MBEDTLS_ECP_DP_BP512R1_ENABLED",
311 #endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */
312 #if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
313     "MBEDTLS_ECP_DP_CURVE25519_ENABLED",
314 #endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */
315 #if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
316     "MBEDTLS_ECP_DP_CURVE448_ENABLED",
317 #endif /* MBEDTLS_ECP_DP_CURVE448_ENABLED */
318 #if defined(MBEDTLS_ECP_NIST_OPTIM)
319     "MBEDTLS_ECP_NIST_OPTIM",
320 #endif /* MBEDTLS_ECP_NIST_OPTIM */
321 #if defined(MBEDTLS_ECP_RESTARTABLE)
322     "MBEDTLS_ECP_RESTARTABLE",
323 #endif /* MBEDTLS_ECP_RESTARTABLE */
324 #if defined(MBEDTLS_ECDSA_DETERMINISTIC)
325     "MBEDTLS_ECDSA_DETERMINISTIC",
326 #endif /* MBEDTLS_ECDSA_DETERMINISTIC */
327 #if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED)
328     "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED",
329 #endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */
330 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED)
331     "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED",
332 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */
333 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED)
334     "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED",
335 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
336 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED)
337     "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED",
338 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */
339 #if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED)
340     "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED",
341 #endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */
342 #if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED)
343     "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED",
344 #endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */
345 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED)
346     "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED",
347 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */
348 #if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED)
349     "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED",
350 #endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */
351 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED)
352     "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED",
353 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */
354 #if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED)
355     "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED",
356 #endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */
357 #if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
358     "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED",
359 #endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
360 #if defined(MBEDTLS_PK_PARSE_EC_EXTENDED)
361     "MBEDTLS_PK_PARSE_EC_EXTENDED",
362 #endif /* MBEDTLS_PK_PARSE_EC_EXTENDED */
363 #if defined(MBEDTLS_ERROR_STRERROR_DUMMY)
364     "MBEDTLS_ERROR_STRERROR_DUMMY",
365 #endif /* MBEDTLS_ERROR_STRERROR_DUMMY */
366 #if defined(MBEDTLS_GENPRIME)
367     "MBEDTLS_GENPRIME",
368 #endif /* MBEDTLS_GENPRIME */
369 #if defined(MBEDTLS_FS_IO)
370     "MBEDTLS_FS_IO",
371 #endif /* MBEDTLS_FS_IO */
372 #if defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES)
373     "MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES",
374 #endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */
375 #if defined(MBEDTLS_NO_PLATFORM_ENTROPY)
376     "MBEDTLS_NO_PLATFORM_ENTROPY",
377 #endif /* MBEDTLS_NO_PLATFORM_ENTROPY */
378 #if defined(MBEDTLS_ENTROPY_FORCE_SHA256)
379     "MBEDTLS_ENTROPY_FORCE_SHA256",
380 #endif /* MBEDTLS_ENTROPY_FORCE_SHA256 */
381 #if defined(MBEDTLS_ENTROPY_NV_SEED)
382     "MBEDTLS_ENTROPY_NV_SEED",
383 #endif /* MBEDTLS_ENTROPY_NV_SEED */
384 #if defined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)
385     "MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER",
386 #endif /* MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER */
387 #if defined(MBEDTLS_MEMORY_DEBUG)
388     "MBEDTLS_MEMORY_DEBUG",
389 #endif /* MBEDTLS_MEMORY_DEBUG */
390 #if defined(MBEDTLS_MEMORY_BACKTRACE)
391     "MBEDTLS_MEMORY_BACKTRACE",
392 #endif /* MBEDTLS_MEMORY_BACKTRACE */
393 #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
394     "MBEDTLS_PK_RSA_ALT_SUPPORT",
395 #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */
396 #if defined(MBEDTLS_PKCS1_V15)
397     "MBEDTLS_PKCS1_V15",
398 #endif /* MBEDTLS_PKCS1_V15 */
399 #if defined(MBEDTLS_PKCS1_V21)
400     "MBEDTLS_PKCS1_V21",
401 #endif /* MBEDTLS_PKCS1_V21 */
402 #if defined(MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS)
403     "MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS",
404 #endif /* MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS */
405 #if defined(MBEDTLS_PSA_CRYPTO_CLIENT)
406     "MBEDTLS_PSA_CRYPTO_CLIENT",
407 #endif /* MBEDTLS_PSA_CRYPTO_CLIENT */
408 #if defined(MBEDTLS_PSA_CRYPTO_DRIVERS)
409     "MBEDTLS_PSA_CRYPTO_DRIVERS",
410 #endif /* MBEDTLS_PSA_CRYPTO_DRIVERS */
411 #if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
412     "MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG",
413 #endif /* MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG */
414 #if defined(MBEDTLS_PSA_CRYPTO_SPM)
415     "MBEDTLS_PSA_CRYPTO_SPM",
416 #endif /* MBEDTLS_PSA_CRYPTO_SPM */
417 #if defined(MBEDTLS_PSA_INJECT_ENTROPY)
418     "MBEDTLS_PSA_INJECT_ENTROPY",
419 #endif /* MBEDTLS_PSA_INJECT_ENTROPY */
420 #if defined(MBEDTLS_RSA_NO_CRT)
421     "MBEDTLS_RSA_NO_CRT",
422 #endif /* MBEDTLS_RSA_NO_CRT */
423 #if defined(MBEDTLS_SELF_TEST)
424     "MBEDTLS_SELF_TEST",
425 #endif /* MBEDTLS_SELF_TEST */
426 #if defined(MBEDTLS_SHA256_SMALLER)
427     "MBEDTLS_SHA256_SMALLER",
428 #endif /* MBEDTLS_SHA256_SMALLER */
429 #if defined(MBEDTLS_SHA512_SMALLER)
430     "MBEDTLS_SHA512_SMALLER",
431 #endif /* MBEDTLS_SHA512_SMALLER */
432 #if defined(MBEDTLS_SSL_ALL_ALERT_MESSAGES)
433     "MBEDTLS_SSL_ALL_ALERT_MESSAGES",
434 #endif /* MBEDTLS_SSL_ALL_ALERT_MESSAGES */
435 #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID)
436     "MBEDTLS_SSL_DTLS_CONNECTION_ID",
437 #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID */
438 #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT)
439     "MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT",
440 #endif /* MBEDTLS_SSL_DTLS_CONNECTION_ID_COMPAT */
441 #if defined(MBEDTLS_SSL_ASYNC_PRIVATE)
442     "MBEDTLS_SSL_ASYNC_PRIVATE",
443 #endif /* MBEDTLS_SSL_ASYNC_PRIVATE */
444 #if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION)
445     "MBEDTLS_SSL_CONTEXT_SERIALIZATION",
446 #endif /* MBEDTLS_SSL_CONTEXT_SERIALIZATION */
447 #if defined(MBEDTLS_SSL_DEBUG_ALL)
448     "MBEDTLS_SSL_DEBUG_ALL",
449 #endif /* MBEDTLS_SSL_DEBUG_ALL */
450 #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC)
451     "MBEDTLS_SSL_ENCRYPT_THEN_MAC",
452 #endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */
453 #if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET)
454     "MBEDTLS_SSL_EXTENDED_MASTER_SECRET",
455 #endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */
456 #if defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
457     "MBEDTLS_SSL_KEEP_PEER_CERTIFICATE",
458 #endif /* MBEDTLS_SSL_KEEP_PEER_CERTIFICATE */
459 #if defined(MBEDTLS_SSL_RENEGOTIATION)
460     "MBEDTLS_SSL_RENEGOTIATION",
461 #endif /* MBEDTLS_SSL_RENEGOTIATION */
462 #if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH)
463     "MBEDTLS_SSL_MAX_FRAGMENT_LENGTH",
464 #endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */
465 #if defined(MBEDTLS_SSL_PROTO_TLS1_2)
466     "MBEDTLS_SSL_PROTO_TLS1_2",
467 #endif /* MBEDTLS_SSL_PROTO_TLS1_2 */
468 #if defined(MBEDTLS_SSL_PROTO_TLS1_3)
469     "MBEDTLS_SSL_PROTO_TLS1_3",
470 #endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
471 #if defined(MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE)
472     "MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE",
473 #endif /* MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE */
474 #if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED)
475     "MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED",
476 #endif /* MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED */
477 #if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED)
478     "MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED",
479 #endif /* MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED */
480 #if defined(MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED)
481     "MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED",
482 #endif /* MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED */
483 #if defined(MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE)
484     "MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE",
485 #endif /* MBEDTLS_SSL_TLS1_3_TICKET_AGE_TOLERANCE */
486 #if defined(MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH)
487     "MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH",
488 #endif /* MBEDTLS_SSL_TLS1_3_TICKET_NONCE_LENGTH */
489 #if defined(MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS)
490     "MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS",
491 #endif /* MBEDTLS_SSL_TLS1_3_DEFAULT_NEW_SESSION_TICKETS */
492 #if defined(MBEDTLS_SSL_EARLY_DATA)
493     "MBEDTLS_SSL_EARLY_DATA",
494 #endif /* MBEDTLS_SSL_EARLY_DATA */
495 #if defined(MBEDTLS_SSL_MAX_EARLY_DATA_SIZE)
496     "MBEDTLS_SSL_MAX_EARLY_DATA_SIZE",
497 #endif /* MBEDTLS_SSL_MAX_EARLY_DATA_SIZE */
498 #if defined(MBEDTLS_SSL_PROTO_DTLS)
499     "MBEDTLS_SSL_PROTO_DTLS",
500 #endif /* MBEDTLS_SSL_PROTO_DTLS */
501 #if defined(MBEDTLS_SSL_ALPN)
502     "MBEDTLS_SSL_ALPN",
503 #endif /* MBEDTLS_SSL_ALPN */
504 #if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY)
505     "MBEDTLS_SSL_DTLS_ANTI_REPLAY",
506 #endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */
507 #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY)
508     "MBEDTLS_SSL_DTLS_HELLO_VERIFY",
509 #endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */
510 #if defined(MBEDTLS_SSL_DTLS_SRTP)
511     "MBEDTLS_SSL_DTLS_SRTP",
512 #endif /* MBEDTLS_SSL_DTLS_SRTP */
513 #if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE)
514     "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE",
515 #endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE */
516 #if defined(MBEDTLS_SSL_SESSION_TICKETS)
517     "MBEDTLS_SSL_SESSION_TICKETS",
518 #endif /* MBEDTLS_SSL_SESSION_TICKETS */
519 #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION)
520     "MBEDTLS_SSL_SERVER_NAME_INDICATION",
521 #endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */
522 #if defined(MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH)
523     "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH",
524 #endif /* MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH */
525 #if defined(MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN)
526     "MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN",
527 #endif /* MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN */
528 #if defined(MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND)
529     "MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND",
530 #endif /* MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND */
531 #if defined(MBEDTLS_TEST_HOOKS)
532     "MBEDTLS_TEST_HOOKS",
533 #endif /* MBEDTLS_TEST_HOOKS */
534 #if defined(MBEDTLS_THREADING_ALT)
535     "MBEDTLS_THREADING_ALT",
536 #endif /* MBEDTLS_THREADING_ALT */
537 #if defined(MBEDTLS_THREADING_PTHREAD)
538     "MBEDTLS_THREADING_PTHREAD",
539 #endif /* MBEDTLS_THREADING_PTHREAD */
540 #if defined(MBEDTLS_USE_PSA_CRYPTO)
541     "MBEDTLS_USE_PSA_CRYPTO",
542 #endif /* MBEDTLS_USE_PSA_CRYPTO */
543 #if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
544     "MBEDTLS_PSA_CRYPTO_CONFIG",
545 #endif /* MBEDTLS_PSA_CRYPTO_CONFIG */
546 #if defined(MBEDTLS_VERSION_FEATURES)
547     "MBEDTLS_VERSION_FEATURES",
548 #endif /* MBEDTLS_VERSION_FEATURES */
549 #if defined(MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK)
550     "MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK",
551 #endif /* MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK */
552 #if defined(MBEDTLS_X509_REMOVE_INFO)
553     "MBEDTLS_X509_REMOVE_INFO",
554 #endif /* MBEDTLS_X509_REMOVE_INFO */
555 #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT)
556     "MBEDTLS_X509_RSASSA_PSS_SUPPORT",
557 #endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */
558 #if defined(MBEDTLS_AESNI_C)
559     "MBEDTLS_AESNI_C",
560 #endif /* MBEDTLS_AESNI_C */
561 #if defined(MBEDTLS_AES_C)
562     "MBEDTLS_AES_C",
563 #endif /* MBEDTLS_AES_C */
564 #if defined(MBEDTLS_ASN1_PARSE_C)
565     "MBEDTLS_ASN1_PARSE_C",
566 #endif /* MBEDTLS_ASN1_PARSE_C */
567 #if defined(MBEDTLS_ASN1_WRITE_C)
568     "MBEDTLS_ASN1_WRITE_C",
569 #endif /* MBEDTLS_ASN1_WRITE_C */
570 #if defined(MBEDTLS_BASE64_C)
571     "MBEDTLS_BASE64_C",
572 #endif /* MBEDTLS_BASE64_C */
573 #if defined(MBEDTLS_BIGNUM_C)
574     "MBEDTLS_BIGNUM_C",
575 #endif /* MBEDTLS_BIGNUM_C */
576 #if defined(MBEDTLS_CAMELLIA_C)
577     "MBEDTLS_CAMELLIA_C",
578 #endif /* MBEDTLS_CAMELLIA_C */
579 #if defined(MBEDTLS_ARIA_C)
580     "MBEDTLS_ARIA_C",
581 #endif /* MBEDTLS_ARIA_C */
582 #if defined(MBEDTLS_CCM_C)
583     "MBEDTLS_CCM_C",
584 #endif /* MBEDTLS_CCM_C */
585 #if defined(MBEDTLS_CHACHA20_C)
586     "MBEDTLS_CHACHA20_C",
587 #endif /* MBEDTLS_CHACHA20_C */
588 #if defined(MBEDTLS_CHACHAPOLY_C)
589     "MBEDTLS_CHACHAPOLY_C",
590 #endif /* MBEDTLS_CHACHAPOLY_C */
591 #if defined(MBEDTLS_CIPHER_C)
592     "MBEDTLS_CIPHER_C",
593 #endif /* MBEDTLS_CIPHER_C */
594 #if defined(MBEDTLS_CMAC_C)
595     "MBEDTLS_CMAC_C",
596 #endif /* MBEDTLS_CMAC_C */
597 #if defined(MBEDTLS_CTR_DRBG_C)
598     "MBEDTLS_CTR_DRBG_C",
599 #endif /* MBEDTLS_CTR_DRBG_C */
600 #if defined(MBEDTLS_DEBUG_C)
601     "MBEDTLS_DEBUG_C",
602 #endif /* MBEDTLS_DEBUG_C */
603 #if defined(MBEDTLS_DES_C)
604     "MBEDTLS_DES_C",
605 #endif /* MBEDTLS_DES_C */
606 #if defined(MBEDTLS_DHM_C)
607     "MBEDTLS_DHM_C",
608 #endif /* MBEDTLS_DHM_C */
609 #if defined(MBEDTLS_ECDH_C)
610     "MBEDTLS_ECDH_C",
611 #endif /* MBEDTLS_ECDH_C */
612 #if defined(MBEDTLS_ECDSA_C)
613     "MBEDTLS_ECDSA_C",
614 #endif /* MBEDTLS_ECDSA_C */
615 #if defined(MBEDTLS_ECJPAKE_C)
616     "MBEDTLS_ECJPAKE_C",
617 #endif /* MBEDTLS_ECJPAKE_C */
618 #if defined(MBEDTLS_ECP_C)
619     "MBEDTLS_ECP_C",
620 #endif /* MBEDTLS_ECP_C */
621 #if defined(MBEDTLS_ENTROPY_C)
622     "MBEDTLS_ENTROPY_C",
623 #endif /* MBEDTLS_ENTROPY_C */
624 #if defined(MBEDTLS_ERROR_C)
625     "MBEDTLS_ERROR_C",
626 #endif /* MBEDTLS_ERROR_C */
627 #if defined(MBEDTLS_GCM_C)
628     "MBEDTLS_GCM_C",
629 #endif /* MBEDTLS_GCM_C */
630 #if defined(MBEDTLS_HKDF_C)
631     "MBEDTLS_HKDF_C",
632 #endif /* MBEDTLS_HKDF_C */
633 #if defined(MBEDTLS_HMAC_DRBG_C)
634     "MBEDTLS_HMAC_DRBG_C",
635 #endif /* MBEDTLS_HMAC_DRBG_C */
636 #if defined(MBEDTLS_LMS_C)
637     "MBEDTLS_LMS_C",
638 #endif /* MBEDTLS_LMS_C */
639 #if defined(MBEDTLS_LMS_PRIVATE)
640     "MBEDTLS_LMS_PRIVATE",
641 #endif /* MBEDTLS_LMS_PRIVATE */
642 #if defined(MBEDTLS_NIST_KW_C)
643     "MBEDTLS_NIST_KW_C",
644 #endif /* MBEDTLS_NIST_KW_C */
645 #if defined(MBEDTLS_MD_C)
646     "MBEDTLS_MD_C",
647 #endif /* MBEDTLS_MD_C */
648 #if defined(MBEDTLS_MD5_C)
649     "MBEDTLS_MD5_C",
650 #endif /* MBEDTLS_MD5_C */
651 #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
652     "MBEDTLS_MEMORY_BUFFER_ALLOC_C",
653 #endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */
654 #if defined(MBEDTLS_NET_C)
655     "MBEDTLS_NET_C",
656 #endif /* MBEDTLS_NET_C */
657 #if defined(MBEDTLS_OID_C)
658     "MBEDTLS_OID_C",
659 #endif /* MBEDTLS_OID_C */
660 #if defined(MBEDTLS_PADLOCK_C)
661     "MBEDTLS_PADLOCK_C",
662 #endif /* MBEDTLS_PADLOCK_C */
663 #if defined(MBEDTLS_PEM_PARSE_C)
664     "MBEDTLS_PEM_PARSE_C",
665 #endif /* MBEDTLS_PEM_PARSE_C */
666 #if defined(MBEDTLS_PEM_WRITE_C)
667     "MBEDTLS_PEM_WRITE_C",
668 #endif /* MBEDTLS_PEM_WRITE_C */
669 #if defined(MBEDTLS_PK_C)
670     "MBEDTLS_PK_C",
671 #endif /* MBEDTLS_PK_C */
672 #if defined(MBEDTLS_PK_PARSE_C)
673     "MBEDTLS_PK_PARSE_C",
674 #endif /* MBEDTLS_PK_PARSE_C */
675 #if defined(MBEDTLS_PK_WRITE_C)
676     "MBEDTLS_PK_WRITE_C",
677 #endif /* MBEDTLS_PK_WRITE_C */
678 #if defined(MBEDTLS_PKCS5_C)
679     "MBEDTLS_PKCS5_C",
680 #endif /* MBEDTLS_PKCS5_C */
681 #if defined(MBEDTLS_PKCS7_C)
682     "MBEDTLS_PKCS7_C",
683 #endif /* MBEDTLS_PKCS7_C */
684 #if defined(MBEDTLS_PKCS12_C)
685     "MBEDTLS_PKCS12_C",
686 #endif /* MBEDTLS_PKCS12_C */
687 #if defined(MBEDTLS_PLATFORM_C)
688     "MBEDTLS_PLATFORM_C",
689 #endif /* MBEDTLS_PLATFORM_C */
690 #if defined(MBEDTLS_POLY1305_C)
691     "MBEDTLS_POLY1305_C",
692 #endif /* MBEDTLS_POLY1305_C */
693 #if defined(MBEDTLS_PSA_CRYPTO_C)
694     "MBEDTLS_PSA_CRYPTO_C",
695 #endif /* MBEDTLS_PSA_CRYPTO_C */
696 #if defined(MBEDTLS_PSA_CRYPTO_SE_C)
697     "MBEDTLS_PSA_CRYPTO_SE_C",
698 #endif /* MBEDTLS_PSA_CRYPTO_SE_C */
699 #if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C)
700     "MBEDTLS_PSA_CRYPTO_STORAGE_C",
701 #endif /* MBEDTLS_PSA_CRYPTO_STORAGE_C */
702 #if defined(MBEDTLS_PSA_ITS_FILE_C)
703     "MBEDTLS_PSA_ITS_FILE_C",
704 #endif /* MBEDTLS_PSA_ITS_FILE_C */
705 #if defined(MBEDTLS_RIPEMD160_C)
706     "MBEDTLS_RIPEMD160_C",
707 #endif /* MBEDTLS_RIPEMD160_C */
708 #if defined(MBEDTLS_RSA_C)
709     "MBEDTLS_RSA_C",
710 #endif /* MBEDTLS_RSA_C */
711 #if defined(MBEDTLS_SHA1_C)
712     "MBEDTLS_SHA1_C",
713 #endif /* MBEDTLS_SHA1_C */
714 #if defined(MBEDTLS_SHA224_C)
715     "MBEDTLS_SHA224_C",
716 #endif /* MBEDTLS_SHA224_C */
717 #if defined(MBEDTLS_SHA256_C)
718     "MBEDTLS_SHA256_C",
719 #endif /* MBEDTLS_SHA256_C */
720 #if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT)
721     "MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT",
722 #endif /* MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT */
723 #if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY)
724     "MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY",
725 #endif /* MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY */
726 #if defined(MBEDTLS_SHA384_C)
727     "MBEDTLS_SHA384_C",
728 #endif /* MBEDTLS_SHA384_C */
729 #if defined(MBEDTLS_SHA512_C)
730     "MBEDTLS_SHA512_C",
731 #endif /* MBEDTLS_SHA512_C */
732 #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT)
733     "MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT",
734 #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT */
735 #if defined(MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY)
736     "MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY",
737 #endif /* MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY */
738 #if defined(MBEDTLS_SSL_CACHE_C)
739     "MBEDTLS_SSL_CACHE_C",
740 #endif /* MBEDTLS_SSL_CACHE_C */
741 #if defined(MBEDTLS_SSL_COOKIE_C)
742     "MBEDTLS_SSL_COOKIE_C",
743 #endif /* MBEDTLS_SSL_COOKIE_C */
744 #if defined(MBEDTLS_SSL_TICKET_C)
745     "MBEDTLS_SSL_TICKET_C",
746 #endif /* MBEDTLS_SSL_TICKET_C */
747 #if defined(MBEDTLS_SSL_CLI_C)
748     "MBEDTLS_SSL_CLI_C",
749 #endif /* MBEDTLS_SSL_CLI_C */
750 #if defined(MBEDTLS_SSL_SRV_C)
751     "MBEDTLS_SSL_SRV_C",
752 #endif /* MBEDTLS_SSL_SRV_C */
753 #if defined(MBEDTLS_SSL_TLS_C)
754     "MBEDTLS_SSL_TLS_C",
755 #endif /* MBEDTLS_SSL_TLS_C */
756 #if defined(MBEDTLS_THREADING_C)
757     "MBEDTLS_THREADING_C",
758 #endif /* MBEDTLS_THREADING_C */
759 #if defined(MBEDTLS_TIMING_C)
760     "MBEDTLS_TIMING_C",
761 #endif /* MBEDTLS_TIMING_C */
762 #if defined(MBEDTLS_VERSION_C)
763     "MBEDTLS_VERSION_C",
764 #endif /* MBEDTLS_VERSION_C */
765 #if defined(MBEDTLS_X509_USE_C)
766     "MBEDTLS_X509_USE_C",
767 #endif /* MBEDTLS_X509_USE_C */
768 #if defined(MBEDTLS_X509_CRT_PARSE_C)
769     "MBEDTLS_X509_CRT_PARSE_C",
770 #endif /* MBEDTLS_X509_CRT_PARSE_C */
771 #if defined(MBEDTLS_X509_CRL_PARSE_C)
772     "MBEDTLS_X509_CRL_PARSE_C",
773 #endif /* MBEDTLS_X509_CRL_PARSE_C */
774 #if defined(MBEDTLS_X509_CSR_PARSE_C)
775     "MBEDTLS_X509_CSR_PARSE_C",
776 #endif /* MBEDTLS_X509_CSR_PARSE_C */
777 #if defined(MBEDTLS_X509_CREATE_C)
778     "MBEDTLS_X509_CREATE_C",
779 #endif /* MBEDTLS_X509_CREATE_C */
780 #if defined(MBEDTLS_X509_CRT_WRITE_C)
781     "MBEDTLS_X509_CRT_WRITE_C",
782 #endif /* MBEDTLS_X509_CRT_WRITE_C */
783 #if defined(MBEDTLS_X509_CSR_WRITE_C)
784     "MBEDTLS_X509_CSR_WRITE_C",
785 #endif /* MBEDTLS_X509_CSR_WRITE_C */
786 #endif /* MBEDTLS_VERSION_FEATURES */
787     NULL
788 };
789 
mbedtls_version_check_feature(const char * feature)790 int mbedtls_version_check_feature( const char *feature )
791 {
792     const char * const *idx = features;
793 
794     if( *idx == NULL )
795         return( -2 );
796 
797     if( feature == NULL )
798         return( -1 );
799 
800     while( *idx != NULL )
801     {
802         if( !strcmp( *idx, feature ) )
803             return( 0 );
804         idx++;
805     }
806     return( -1 );
807 }
808 
809 #endif /* MBEDTLS_VERSION_C */
810