blob: 604ca6494984532f02353a21f16e6c687a10a83d [file] [log] [blame]
Sergio Rodriguez312def22016-07-20 15:03:12 -07001# Kconfig - Cryptography primitive options for mbed TLS
2
3#
4# Copyright (c) 2016 Intel Corporation
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
19
20menuconfig MBEDTLS
21 bool
22 prompt "mbedTLS Support"
23 default n
24 help
25 This option enables the mbedTLS cryptography library.
26
27config MBEDTLS_BUILTIN
28 bool "Enable mbedTLS integrated sources"
29 depends on MBEDTLS
30 default n
31 help
Anas Nashif429c2a42017-12-13 10:08:21 -050032 Link with local mbedTLS sources instead of external library.
Sergio Rodriguez312def22016-07-20 15:03:12 -070033
34config MBEDTLS_CFG_FILE
35 string "mbed TLS configuration file"
36 depends on MBEDTLS_BUILTIN
37 default "config-threadnet.h"
38 help
Anas Nashif429c2a42017-12-13 10:08:21 -050039 Enable custom mbed TLS configuration
Sergio Rodriguez312def22016-07-20 15:03:12 -070040
Jukka Rissanen65b96562017-06-22 15:38:37 +030041config MBEDTLS_DEBUG
Michael Scottafd54422017-10-01 13:37:41 -070042 bool "mbed TLS debug activation"
Jukka Rissanen65b96562017-06-22 15:38:37 +030043 depends on MBEDTLS_BUILTIN
44 default n
45 help
Anas Nashif429c2a42017-12-13 10:08:21 -050046 Enable debugging activation for mbed TLS configuration. Note that this
47 does not directly cause any debug print output. For that you need to
48 call
49 mbedtls_debug_set_threshold(level);
50 and
51 mbedtls_ssl_conf_dbg(&mbedtls.conf, my_debug, NULL);
52 functions in your application, and create the my_debug() function to
53 actually print something useful.
Jukka Rissanen65b96562017-06-22 15:38:37 +030054
Sergio Rodriguez312def22016-07-20 15:03:12 -070055config MBEDTLS_TEST
56 bool "Compile internal self test functions"
57 depends on MBEDTLS_BUILTIN
58 default n
59 help
Anas Nashif429c2a42017-12-13 10:08:21 -050060 Enable self test function for the crypto algorithms
Sergio Rodriguez312def22016-07-20 15:03:12 -070061
62config MBEDTLS_LIBRARY
63 bool "Enable mbedTLS external library"
64 depends on MBEDTLS
65 default n
66 help
Anas Nashif429c2a42017-12-13 10:08:21 -050067 This option enables mbedTLS library.
Sergio Rodriguez312def22016-07-20 15:03:12 -070068
69config MBEDTLS_INSTALL_PATH
70 string "mbedTLS install path"
71 depends on MBEDTLS_LIBRARY
72 help
Anas Nashif429c2a42017-12-13 10:08:21 -050073 This option holds the path where the mbedTLS libraries and headers are
74 installed. Make sure this option is properly set when MBEDTLS_LIBRARY
75 is enabled otherwise the build will fail.
Jukka Rissanena9c0a3f2017-06-22 16:23:39 +030076
77config MBEDTLS_ENABLE_HEAP
78 bool "Enable global heap for mbed TLS"
79 default n
80 depends on MBEDTLS
81 help
Anas Nashif429c2a42017-12-13 10:08:21 -050082 This option enables the mbedtls to use the heap. This setting must
83 be global so that various applications and libraries in Zephyr do not
84 try to do this themselves as there can be only one heap defined
85 in mbedtls. If this is enabled, then the Zephyr will, during the device
86 startup, initialize the heap automatically.
Jukka Rissanena9c0a3f2017-06-22 16:23:39 +030087
88config MBEDTLS_HEAP_SIZE
89 int "Heap size for mbed TLS"
Ramakrishna Pallala26c1bd52017-11-03 16:38:29 -040090 default 512
Jukka Rissanena9c0a3f2017-06-22 16:23:39 +030091 depends on MBEDTLS_ENABLE_HEAP
92 help
Anas Nashif429c2a42017-12-13 10:08:21 -050093 The mbedtls routines will use this heap if enabled.
94 See ext/lib/crypto/mbedtls/include/mbedtls/config.h and
95 MBEDTLS_MEMORY_BUFFER_ALLOC_C option for details. That option is not
96 enabled by default.
97 Default value for the heap size is not set as it depends on the
98 application. For server application 15000 bytes should be enough.
99 For some dedicated and specific usage of mbedtls API, the 1000 bytes
100 might be ok.