1 /**
2  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
3  *  SPDX-License-Identifier: Apache-2.0
4  *
5  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
6  *  not use this file except in compliance with the License.
7  *  You may obtain a copy of the License at
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13  *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  *  This file is part of mbed TLS (https://tls.mbed.org)
18  */
19 
20 #ifndef MBEDTLS_CONFIG_H
21 #define MBEDTLS_CONFIG_H
22 
23 #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
24 #define _CRT_SECURE_NO_DEPRECATE 1
25 #endif
26 
27 //#define MBEDTLS_PLATFORM_MEMORY
28 #define MBEDTLS_FS_IO
29 //#define MBEDTLS_VERSION_FEATURES
30 #define MBEDTLS_ASN1_PARSE_C
31 #define MBEDTLS_BASE64_C
32 #define MBEDTLS_BIGNUM_C
33 #define MBEDTLS_MD_C
34 #define MBEDTLS_OID_C
35 #define MBEDTLS_PEM_PARSE_C
36 
37 /**
38  * \def MBEDTLS_PLATFORM_C
39  *
40  * Enable the platform abstraction layer that allows you to re-assign
41  * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit().
42  *
43  * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT
44  * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned
45  * above to be specified at runtime or compile time respectively.
46  *
47  * \note This abstraction layer must be enabled on Windows (including MSYS2)
48  * as other module rely on it for a fixed snprintf implementation.
49  *
50  * Module:  library/platform.c
51  * Caller:  Most other .c files
52  *
53  * This module enables abstraction of common (libc) functions.
54  */
55 #define MBEDTLS_PLATFORM_C
56 
57 /**
58  * \def MBEDTLS_TIMING_C
59  *
60  * Enable the semi-portable timing interface.
61  *
62  * \note The provided implementation only works on POSIX/Unix (including Linux,
63  * BSD and OS X) and Windows. On other platforms, you can either disable that
64  * module and provide your own implementations of the callbacks needed by
65  * \c mbedtls_ssl_set_timer_cb() for DTLS, or leave it enabled and provide
66  * your own implementation of the whole module by setting
67  * \c MBEDTLS_TIMING_ALT in the current file.
68  *
69  * \note See also our Knowledge Base article about porting to a new
70  * environment:
71  * https://tls.mbed.org/kb/how-to/how-do-i-port-mbed-tls-to-a-new-environment-OS
72  *
73  * Module:  library/timing.c
74  * Caller:  library/havege.c
75  *
76  * This module is used by the HAVEGE random number generator.
77  */
78 #define MBEDTLS_TIMING_C
79 
80 //#define MBEDTLS_MPI_WINDOW_SIZE            6 /**< Maximum windows size used. */
81 //#define MBEDTLS_MPI_MAX_SIZE            1024 /**< Maximum number of bytes for usable MPIs. */
82 //#define MBEDTLS_MEMORY_ALIGN_MULTIPLE      4 /**< Align on multiples of this value */
83 
84 #if defined(TARGET_LIKE_MBED) && defined(YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE)
85 #include YOTTA_CFG_MBEDTLS_TARGET_CONFIG_FILE
86 #endif
87 
88 #if defined(YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE)
89 #include YOTTA_CFG_MBEDTLS_USER_CONFIG_FILE
90 #elif defined(MBEDTLS_USER_CONFIG_FILE)
91 #include MBEDTLS_USER_CONFIG_FILE
92 #endif
93 
94 #include "check_config.h"
95 
96 #endif /* MBEDTLS_CONFIG_H */
97