Home
last modified time | relevance | path

Searched refs:code (Results 1 – 25 of 85) sorted by relevance

1234

/mbedtls-latest/docs/architecture/testing/
Dinvasive-testing.md30 …n at least some configurations. Features with a significant impact on the code size or attack surf…
36 …nctions in `library/*.h` and include the corresponding header in the test code. If the function sh…
38 If test code or test data depends on internal details of the library and not just on its documented…
55 If the most practical way to test something is to add code to the product that is only useful for t…
57 * **Only use test-specific code when necessary.** Anything that can be tested through the documente…
58 * **Test-specific code must be guarded by `#if defined(MBEDTLS_TEST_HOOKS)`**. Do not create fine-g…
65 …ive code for test purposes. That is, library code calls `mbedtls_foo()`, and there is a mechanism …
67 …an be replaced at compile time to support alternative platforms, the test code should be compatibl…
69 …ally skipping side effects in its parameters), to provide a hook for test code; such functions sho…
73 In unit test code that needs to modify the internal behavior:
[all …]
/mbedtls-latest/programs/ssl/
Dssl_mail_client.c226 char code[4]; in write_ssl_and_get_response() local
260 code[idx++] = data[i]; in write_ssl_and_get_response()
265 if (idx == 4 && code[0] >= '0' && code[0] <= '9' && code[3] == ' ') { in write_ssl_and_get_response()
266 code[3] = '\0'; in write_ssl_and_get_response()
267 return atoi(code); in write_ssl_and_get_response()
279 char code[4]; in write_and_get_response() local
304 code[idx++] = data[i]; in write_and_get_response()
309 if (idx == 4 && code[0] >= '0' && code[0] <= '9' && code[3] == ' ') { in write_and_get_response()
310 code[3] = '\0'; in write_and_get_response()
311 return atoi(code); in write_and_get_response()
/mbedtls-latest/scripts/data_files/
Derror.fmt31 /* Extract the high-level part from the error code. */
54 /* Extract the low-level part from the error code. */
89 // Translate high level error code.
100 // level code.
113 // If high level code is present, make a concatenation between both
129 // Translate low level error code.
/mbedtls-latest/library/
Dmps_error.h37 #define MBEDTLS_MPS_MAKE_ERROR(code) \ argument
38 (-(MBEDTLS_MPS_ERR_BASE | (code)))
55 #define MBEDTLS_MPS_READER_MAKE_ERROR(code) \ argument
56 (-(MBEDTLS_MPS_READER_ERR_BASE | (code)))
/mbedtls-latest/docs/proposed/
Dpsa-conditional-inclusion-c.md12 … the available cryptographic mechanisms, primarily in order to reduce the code footprint of the co…
24 …work well for asymmetric cryptography. For example, many parts of the ECC code have no `MBEDTLS_xx…
32 …bly configured Mbed TLS build must not include the corresponding software code (unless a software …
56 …ersions, things are as they are today: the PSA subsystem includes generic code unconditionally, an…
57 … configuration file and the Mbed TLS configuration file. For example, the code in `aes.c` is enabl…
73 * In Mbed TLS test code.
74 * In Mbed TLS library code using `MBEDTLS_USE_PSA_CRYPTO`, for example in TLS to determine which ci…
75 * In application code that provides additional features based on cryptographic capabilities, for ex…
92 …te key: there is no way to only include private-key operations (which typically saves little code).
100 …h to include only certain curves in a family, and that can lead to a significant gain in code size.
[all …]
Dpsa-driver-integration-guide.md9 …change: until further notice, we do not guarantee backward compatibility with existing driver code.
13 The PSA cryptography driver interface provides a way to build Mbed TLS with additional code that im…
17 … **driver description files** in JSON format and some code to include in the build. The driver cod…
37 <!-- TODO: what if the driver is provided as C source code? -->
/mbedtls-latest/tests/suites/
Dmain_test.function12 * Main code file : __MBEDTLS_TEST_TEMPLATE__TEST_MAIN_FILE
13 * Platform code file : __MBEDTLS_TEST_TEMPLATE__TEST_PLATFORM_FILE
28 /* Test code may use deprecated identifiers only if the preprocessor symbol
38 /* Common helper code */
57 /* Test dispatch code */
64 * Identifiers and evaluation code is generated by script:
96 * Identifiers and check code is generated by script:
219 /* Main Test code */
228 * \return Exit code.
Dtest_suite_platform.function48 /* This goto is added to avoid warnings from the generated code. */
58 /* This goto is added to avoid warnings from the generated code. */
70 * WARNING: DO NOT ENABLE THIS TEST. We keep the code here to document the
80 /* This goto is added to avoid warnings from the generated code. */
88 * WARNING: DO NOT ENABLE THIS TEST. We keep the code here to document the
119 /* This goto is added to avoid warnings from the generated code. */
Dtest_suite_net.function31 * \return \c 0 on success, a negative error code on error.
78 * descriptor greater or equal to FD_SETSIZE. This code is specific to
99 * might do); but we don't do such things in our test code, so the unit
120 * it may still happen to return the expected failure code, but if this
121 * is problematic on the particular platform where the code is running,
Dtest_suite_error.function11 void error_strerror(int code, char *result_str)
17 mbedtls_strerror(code, buf, 500);
/mbedtls-latest/docs/architecture/psa-migration/
Dmd-cipher-dispatch.md6 This document discusses a migration strategy for code that is not subject to `MBEDTLS_USE_PSA_CRYPT…
22 so that my code keeps working in new minor versions of Mbed TLS.
26 As a developer of library code that uses Mbed TLS to perform cryptographic operations,
28 so that my code works in all Mbed TLS configurations.
40 to minimize the code size.
49 I want to avoid duplicating code,
54 …ng term, all code using cryptography should use PSA interfaces, to benefit from PSA drivers, allow…
56 …non-PSA interfaces to use PSA interfaces under the hood, without breaking code in the cases where …
64 …r SHA256, `MBEDTLS_AES_C && MBEDTLS_CIPHER_MODE_CBC` for AES-CBC, etc. In code that uses the PSA i…
75code that relies on drivers, but the driver interfaces may change without notice.” In practice, th…
[all …]
Dstrategy.md61 two versions of some parts of the code: one using PSA, the other using the
69 maintaining dual code paths until the next major version. (Note: these
101 `ENTROPY_C`. This requires going through the PSA code base to adjust
106 available in entropy-less builds. (Then code using those functions still needs
127 current strategy is to keep using those identifiers in most of the code, in
142 code anywhere.
170 code size.
171 - Downside: TLS/X.509 code has to be done for each operation.
182 - Upside: changes mostly contained in one place, TLS/X.509 code only needs to
188 changes in application code.
[all …]
Dtesting.md18 Generally, code review is enough to ensure that PSA APIs are indeed used where
22 to confirm which code path is taken. This is generally unnecessary, except when
23 a decision is made at run-time about whether to use the PSA or legacy code
99 whether to use the PSA or legacy code paths, specific tests might be in order.
/mbedtls-latest/
DBRANCHES.md32 ## Backwards Compatibility for application code
35 code that's working and secure with Mbed TLS x.y.z and does not rely on
38 number, and your code will still build, be secure, and work.
45 cryptographic algorithm does not break code that does not use that
55 * Returning an error code that was not previously documented for a function
57 * Changing which error code is returned in a case where multiple error
63 There are rare exceptions where we break API compatibility: code that was
92 re-compiling) and to avoid any increase in code size or RAM usage, or in the
93 minimum version of tools needed to build the code. The only exception, as
97 increase code size for a security fix.)
DCONTRIBUTING.md18 - The code should be written in a clean and readable style, and must follow [our coding standards](…
19 - The code should be written in a portable generic way, that will benefit the whole community, and …
20 - The code should be secure, and will be reviewed from a security point of view as well.
33code to work with a newer version of the library. Unless the user has made an active decision to u…
43 …ional features or API extensions which may introduce issues or change the code size or RAM usage, …
64 …lable to show test coverage of the library. New code contributions should provide a similar level …
79 1. Complex parts in the code should include comments.
87 … these licenses. This means that users may choose which of these licenses they take the code under.
93 The copyright on contributions is retained by the original authors of the code. Where possible for …
95code to us, the committer and all authors are required to make the submission under the terms of t…
DREADME.md4 …09 certificate manipulation and the SSL/TLS and DTLS protocols. Its small code footprint makes it …
51 * Python 3.8 to generate the test code. Python is also needed to integrate PSA drivers and to build…
63 The source code of Mbed TLS includes some files that are automatically generated by scripts and who…
91 In order to build from the source code using GNU Make, just enter at the command line:
143 - `Release`. This generates the default code without any unnecessary information in the binary fi…
144 - `Debug`. This generates debug information and disables optimization of the code.
145 - `Coverage`. This generates code coverage information in addition to debug information.
146code with AddressSanitizer to check for memory errors. (This includes LeakSanitizer, with recent v…
148 - `MemSan`. This instruments the code with MemorySanitizer to check for uninitialised memory read…
238 …mple programs is to demonstrate specific features of the library, and the code may need to be adap…
[all …]
DLICENSE3 This means that users may choose which of these licenses they take the code
35 including but not limited to software source code, documentation
40 not limited to compiled object code, generated documentation,
64 communication on electronic mailing lists, source code control systems,
238 this service if you wish), that you receive source code or can get it
250 source code. And you must show them these terms so they know their
294 source code as you receive it, in any medium, provided that you
349 under Section 2) in object code or executable form under the terms of
353 source code, which must be distributed under the terms of Sections
359 machine-readable copy of the corresponding source code, to be
[all …]
/mbedtls-latest/3rdparty/p256-m/p256-m/
DREADME.md12 2. low code size & RAM usage;
20 code**, using **less than 768 bytes of RAM**, with comparable performance
27 - [Code size](#code-size)
60 - The code is standard C99; it builds without warnings with `clang
62 - The code is small and well documented, including internal APIs: with the
63 header file, it's less than 700 lines of code, and more lines of comments
64 than of code.
75 carefully checking the validity domain of formulas used throughout the code;
97 improve performance and code size. (On Cortex-M and Cortex-A cores wtih GCC or
127 with `-mthumb -Os`, here are samples of code sizes reached on selected cores:
[all …]
/mbedtls-latest/docs/architecture/
Dtls13-support.md142 exchange mode enabled, the TLS 1.3 implementation does not contain any code
147 mode enabled, the TLS 1.3 implementation does not contain any code related
156 exchange mode enabled, the TLS 1.3 implementation does not contain any code
170 PR upstreaming the first part of TLS 1.3 ClientHello writing code.
187 everywhere in the code.
235 and MBEDTLS_GET_UINT{8|16|32|64}_BE improve the readability of the code and
239 `MBEDTLS_SSL_CHK_BUF_READ_PTR`, improve the readability of the code and
257 name `p` has been chosen as it was already widely used in TLS code.
284 places in the code. When a constant is used only locally in a function
300 split them to ease their search in the code base.
[all …]
Dpsa-shared-memory.md6 … the cryptography library is using it, and thus cause unexpected behavior in the cryptography code.
41 1. The crypto code reads part of the input and validates it, or injects it into a calculation.
43 3. The crypto code reads the same part again, and performs an action which would be impossible if t…
45code reads the length field and checks that it fits within the buffer. (This could be the length o…
56 1. The crypto code writes some intermediate data into the output buffer.
58 3. The crypto code reads the intermediate data back and continues the calculation, leading to an ou…
68 1. The crypto code writes some intermediate data into the output buffer. This intermediate data mus…
70 3. The crypto code overwrites the intermediate data.
80 1. The crypto code processes part of the input and writes the corresponding part of the output.
82 3. The crypto code processes the rest of the input.
[all …]
Dpsa-keystore-design.md69 … larger RAM usage at rest for the static key store, larger code size and more risk due to code com…
71 … material is allocated on the heap. Compared to the hybrid key store, the code size and RAM consum…
77 …h`, as explained above), to minimize the risk of bugs and the increase in code size. These conside…
79 …Mbed TLS 3.6.x are that this increases complexity somewhat (slightly more code size, and more risk…
85 Some parts of the key slot management code use **key slices** as an abstraction. A key slice is an …
106 …e key slot array until it finds one that is empty. If there are none, the code looks for a persist…
141 Some parts of the slot management code need to determine which key slice contains a key slot when g…
167 … it finds a slice that is not full. If all allocated slices are full, the code allocates a new sli…
183 …lices. Mixing allocated and unallocated slices may make some parts of the code a little more compl…
212 If the cache slice is full, the code will try to evict an entry. Only slots that do not have reader…
[all …]
/mbedtls-latest/3rdparty/everest/
DREADME.md3 …. The C code is automatically derived from the (verified) [original implementation](https://github…
5 … integer type and KreMLin therefore has to use additional (also verified) code to simulate them, r…
/mbedtls-latest/docs/
D3.0-migration-guide.md6 need to change their own code in order to make it work with Mbed TLS 3.0.
24 explain how to upgrade, and should be referred to when migrating code. Where a
31 Then browse `apidoc/deprecated.html` for guidance on upgrading deprecated code.
46 * In code, use `#include <mbedtls/build_info.h>`. Don't include `mbedtls/config.h` and don't refer …
48 …dtls/version.h`, this has moved to `include/mbedtls/build_info.h`. From C code, both headers now d…
70 …y, and these fields are not documented as public, you need to change your code. If an accessor (ge…
74 …r.MBEDTLS_PRIVATE(foo)`. Note that you do so at your own risk, since such code is likely to break …
150 and still relied on `compat-1.3.h` in their code.
152 Please use the new names directly in your code; `scripts/rename.pl` (from any
195 to call that from application code. However if you do (or if you want to
[all …]
Dtls13-early-data.md77 All together, code to write and send a buffer of data as long as possible as
103 code to write and send a buffer of data could plausibly look like:
155 MBEDTLS_ERR_SSL_RECEIVED_EARLY_DATA error code. Early data can then be read
158 For example, a typical code to establish a TLS connection, where ssl is the SSL
/mbedtls-latest/tests/scripts/
Dtest_zeroize.gdb19 # "unnecessary" assignments as part of redundant code elimination. To identify
20 # such code, the compilar will create some form dependency graph between
22 # data structure to remove redundant code that does not have an impact on the

1234