• Home
  • Raw
  • Download

Lines Matching +full:windows +full:- +full:cmake +full:- +full:tests

6 Mbed TLS includes a reference implementation of the [PSA Cryptography API](#psa-cryptography-api). …
9 -------------
11 … more programmatic way using the Python 3 script `scripts/config.py` (use `--help` for usage instr…
13 …l environment variables such as `CC` and `CFLAGS` when using the Make and CMake build system (see …
15 We provide some non-standard configurations focused on specific use cases in the `configs/` directo…
18 -------------
20 The main Mbed TLS documentation is available via [ReadTheDocs](https://mbed-tls.readthedocs.io/).
22 …or the PSA Cryptography API is available [on GitHub](https://arm-software.github.io/psa-api/crypto…
24 To generate a local copy of the library documentation in HTML format, tailored to your compile-time…
33 ---------
37 - GNU Make
38 - CMake
39 - Microsoft Visual Studio
41 …lopment are CMake and GNU Make. Those systems are always complete and up-to-date. The others shoul…
43CMake build systems create three libraries: libmbedcrypto, libmbedx509, and libmbedtls. Note that …
49 * GNU Make 3.82 or a build tool that CMake supports.
52 * Perl to run the tests, and to generate some source files in the development branch.
53 * CMake 3.10.2 or later (if using CMake).
66 python -m pip install -r scripts/basic.requirements.txt
70 …you are cross-compiling, you must set the `CC` environment variable to a C compiler for the host p…
72 Any of the following methods are available to generate the configuration-independent files:
74 * If not cross-compiling, running `make` with any target, or just `make`, will automatically genera…
75 * On non-Windows systems, when not cross-compiling, CMake will generate the required files automati…
76 * Run `make generated_files` to generate all the configuration-independent files.
77 * On Unix/POSIX systems, run `tests/scripts/check-generated-files.sh -u` to generate all the config…
78 * On Windows, run `scripts\make_generated_files.bat` to generate all the configuration-independent …
84 …easily move between different platforms. Users who need more features are recommended to use CMake.
90 In order to run the tests, enter:
94 The tests need Python to be built and Perl to be run. If you don't have one of them installed, you …
98 You'll still be able to run a much smaller set of tests with:
102Windows platform, you should use `WINDOWS_BUILD=1` if the target is Windows but the build environm…
104 …verridden separately using `WARNING_CFLAGS`. Some directory-specific options (for example, `-I` di…
106-O2` and setting `WARNING_CFLAGS` overrides its default value (starting with `-Wall -Wextra`), so …
108 …ms/` and `tests/` for options to manually add or remove for specific platforms. You can also check…
110 …us know what, so we can add it to the [Mbed TLS Knowledge Base](https://mbed-tls.readthedocs.io/en…
112 ### CMake subsection
114 In order to build the source using CMake in a separate directory (recommended), just enter at the c…
117 cmake /path/to/mbedtls_source
118 cmake --build .
120 In order to run the tests, enter:
126 cmake -DENABLE_TESTING=Off /path/to/mbedtls_source
128 …the test suites, but kept the programs enabled, you can still run a much smaller set of tests with:
132 To configure CMake for building shared libraries, use:
134 cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On /path/to/mbedtls_source
136 …ild modes available within the CMake buildsystem. Most of them are available for gcc and clang, th…
138 - `Release`. This generates the default code without any unnecessary information in the binary fi…
139 - `Debug`. This generates debug information and disables optimization of the code.
140 - `Coverage`. This generates code coverage information in addition to debug information.
141 - `ASan`. This instruments the code with AddressSanitizer to check for memory errors. (This inclu…
142 - `ASanDbg`. Same as ASan but slower, with debug information and better stack traces.
143 - `MemSan`. This instruments the code with MemorySanitizer to check for uninitialised memory read…
144 - `MemSanDbg`. Same as MemSan but slower, with debug information, better stack traces and origin …
145 - `Check`. This activates the compiler warnings that depend on optimization and treats all warnin…
147 Switching build modes in CMake is simple. For debug mode, enter at the command line:
149 cmake -D CMAKE_BUILD_TYPE=Debug /path/to/mbedtls_source
151 To list other available CMake options, use:
153 cmake -LH
155 Note that, with CMake, you can't adjust the compiler or its flags after the
156 initial invocation of cmake. This means that `CC=your_cc make` and `make
158 These variables need to be adjusted when invoking cmake for the first time,
161 CC=your_cc cmake /path/to/mbedtls_source
163 If you already invoked cmake and want to change those settings, you need to
166 Note that it is possible to build in-place; this will however overwrite the
171 cmake .
175 CMake cache. This can be done with the following command using GNU find:
177 find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} +
181 CC=your_cc cmake .
184 Regarding variables, also note that if you set CFLAGS when invoking cmake,
185 your value of CFLAGS doesn't override the content provided by cmake (depending
191 CMake projects. You can include Mbed TLS's CMake targets yourself with:
195 If prompted, set `MbedTLS_DIR` to `${YOUR_MBEDTLS_INSTALL_DIR}/cmake`. This
198 - `MbedTLS::mbedcrypto` (Crypto library)
199 - `MbedTLS::mbedtls` (TLS library)
200 - `MbedTLS::mbedx509` (X509 library)
217 Mbed TLS supports being built as a CMake subproject. One can
218 use `add_subdirectory()` from a parent CMake project to include Mbed TLS as a
225 …c projects needed to build the library and all the programs. The files in tests are not generated …
227 …enerated source files in the development branch”](#generated-source-files-in-the-development-branc…
230 ----------------
233 …fic features of the library, and the code may need to be adapted to build a real-world application.
235 Tests section in README for Mbed TLS
236 -----
238 Mbed TLS includes an elaborate test suite in `tests/` that initially requires Python to generate th…
242 - `tests/ssl-opt.sh` runs integration tests for various TLS options (renegotiation, resumption, e…
243 - `tests/compat.sh` tests interoperability of every ciphersuite with other implementations.
244 - `tests/scripts/test-ref-configs.pl` test builds in various reduced configurations.
245 - `tests/scripts/depends.py` test builds in configurations with a single curve, key exchange, has…
246 - `tests/scripts/all.sh` runs a combination of the above tests, plus some more, with various buil…
249 ----------------
253 - [Porting Mbed TLS to a new environment or OS](https://mbed-tls.readthedocs.io/en/latest/kb/how-
254 - [What external dependencies does Mbed TLS rely on?](https://mbed-tls.readthedocs.io/en/latest/k…
255 - [How do I configure Mbed TLS](https://mbed-tls.readthedocs.io/en/latest/kb/compiling-and-buildi…
259 - Bytes must be 8 bits.
260 - All-bits-zero must be a valid representation of a null pointer.
261 - Signed integers must be represented using two's complement.
262 - `int` and `size_t` must be at least 32 bits wide.
263 - The types `uint8_t`, `uint16_t`, `uint32_t` and their signed equivalents must be available.
266 --------------------
270 …ture (PSA)](https://developer.arm.com/architectures/security-architectures/platform-security-archi…
272 …/arm-software.github.io/psa-api/crypto/) provides access to a set of cryptographic primitives. It …
282 …to provide your feedback privately, please email us at [`mbed-crypto@arm.com`](mailto:mbed-crypto@…
289 … cryptography for most operations regardless of this option. See `docs/use-psa-crypto.md` for deta…
301 -------
303-2.0](https://spdx.org/licenses/Apache-2.0.html) license. See the [LICENSE](LICENSE) file for the …
306 ------------
311 -------
313 * To report a security vulnerability in Mbed TLS, please email <mbed-tls-security@lists.trustedfirm…
314 …eature in Mbed TLS, please [file an issue on GitHub](https://github.com/Mbed-TLS/mbedtls/issues/ne…