/mbedtls/tests/scripts/ |
A D | generate_test_code.py | 558 if code.find('exit:') == -1: 561 code = """exit: 626 code = '' 647 code += line 649 code += line 655 code = code.replace(name, 'test_' + name, 1) 661 code = code.replace('()', '(void)', 1) 669 code += line 674 code = line_directive + code 675 code = generate_function_code(name, code, local_vars, args_dispatch, [all …]
|
A D | test_generate_test_code.py | 203 self.assertEqual(code, expected) 220 self.assertEqual(code, expected) 237 self.assertEqual(code, expected) 258 self.assertEqual(code, expected) 265 code = gen_dispatch('test_a', []) 269 self.assertEqual(code, expected) 646 self.assertEqual(code, expected) 690 self.assertEqual(code, expected) 750 self.assertEqual(code, expected) 803 self.assertEqual(code, expected) [all …]
|
A D | test_zeroize.gdb | 19 # "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
|
/mbedtls/docs/architecture/testing/ |
A D | invasive-testing.md | 38 If test code or test data depends on internal details of the library and not just on its documented… 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 … 73 In unit test code that needs to modify the internal behavior: 203 | Effacement | ++ Zero impact on the code | 217 | Portability | ++ It's just C code so it works everywhere | 219 …| + Test interfaces impact the product source code, but at least they're clearly marked as such in… 227 * **Minimize the impact on code**.<br> 228 …ve test-specific conditional compilation littered through the code, as that makes the code hard to… 241 | Effacement | ++ Zero impact on the code | [all …]
|
/mbedtls/library/ |
A D | mps_error.h | 37 #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/programs/ssl/ |
A D | ssl_mail_client.c | 226 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/scripts/data_files/ |
A D | error.fmt | 31 /* 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/tests/suites/ |
A D | main_test.function | 12 * 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.
|
A D | test_suite_platform.function | 48 /* 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. */
|
A D | test_suite_net.function | 31 * \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,
|
A D | test_suite_error.function | 11 void error_strerror(int code, char *result_str) 17 mbedtls_strerror(code, buf, 500);
|
/mbedtls/docs/proposed/ |
A D | psa-driver-integration-guide.md | 9 …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? -->
|
A D | psa-conditional-inclusion-c.md | 32 …bly configured Mbed TLS build must not include the corresponding software code (unless a software … 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… 106 …code is usually not specialized for any particular group, so reducing the number of available grou… 125 … outputs of the transpilation of a driver description, alongside the glue code for calling the dri… 143 …code that uses these parts. This includes structure definitions in `psa/crypto_struct.h`, size cal… 154 * (D) indicates a symbol that is deduced from other symbols by code that ships with Mbed TLS. 167 …DTLS_PSA_BUILTIN_xxx` symbols should not be visible to application code or driver code, since they… 181 ### Structure of PSA Crypto library code 187 #### Conditional inclusion of mechanism-specific code argument [all …]
|
/mbedtls/ |
A D | BRANCHES.md | 32 ## 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.)
|
A D | CONTRIBUTING.md | 18 - 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. 33 …code 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 … 95 …code to us, the committer and all authors are required to make the submission under the terms of t…
|
A D | README.md | 4 …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… 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. 146 …code 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… 308 * `MBEDTLS_USE_PSA_CRYPTO` is necessary so that the X.509 and TLS code calls the PSA drivers rather… 316 ### Third-party code included in Mbed TLS [all …]
|
A D | LICENSE | 3 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, 294 source code as you receive it, in any medium, provided that you 359 machine-readable copy of the corresponding source code, to be 364 to distribute corresponding source code. (This alternative is 371 code means all the source code for all modules it contains, plus any 374 special exception, the source code distributed need not include 380 If distribution of executable or object code is made by offering 382 access to copy the source code from the same place counts as [all …]
|
/mbedtls/docs/architecture/psa-migration/ |
A D | md-cipher-dispatch.md | 22 so that my code keeps working in new minor versions of Mbed TLS. 28 so that my code works in all Mbed TLS configurations. 40 to minimize the code size. 49 I want to avoid duplicating code, 75 …code that relies on drivers, but the driver interfaces may change without notice.” In practice, th… 273 …ed domain](#classification-of-callers), i.e. code that can be called both from legacy code and fro… 297 * Mixed-domain code can call PSA code if it knows that `psa_crypto_init()` has been called, without… 313 * It includes extra fluff such as names and HMAC. This costs code size. 370 - No code change in GCM and CCM - only need to update dependencies. 382 Prototyping both approaches showed better code size savings and cleaner code with a new internal mo… [all …]
|
A D | strategy.md | 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 142 code anywhere. 170 code size. 171 - Downside: TLS/X.509 code has to be done for each operation. 188 changes in application code. 201 the TLS/X.509 code, but a contained change in the application. 206 code, and a contained change in TLS code. (It only supported a subset of 211 support for key isolation, but at the (unavoidable) code of change in 336 Note that in order to achieve that goal, even for code that obeys [all …]
|
/mbedtls/3rdparty/p256-m/p256-m/ |
A D | README.md | 12 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. 140 - The code has no dependency on libc functions or the toolchain's runtime 188 1 line for Cortex-M4), the code would be roughly 2 times slower on those 311 code that p256-m uses in order to minimize code size. [all …]
|
/mbedtls/docs/architecture/ |
A D | tls13-support.md | 170 PR upstreaming the first part of TLS 1.3 ClientHello writing code. 187 everywhere in the code. 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. 340 Overview of handshake code organization 365 reduce the risk of bugs, the code of the message processing and writing 395 message or that can be done to simplify the parsing code. Some simple and 402 reduce the size of its code and to simplify it. 421 be done to simplify the writing code. [all …]
|
/mbedtls/3rdparty/everest/ |
A D | README.md | 3 …. 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/scripts/data_files/driver_templates/ |
A D | OS-template-opaque.jinja | 1 {# One Shot function's dispatch code for opaque drivers. 6 * nest_indent: number of extra spaces to indent the code to.
|
A D | OS-template-transparent.jinja | 1 {# One Shot function's dispatch code for transparent drivers. 6 * nest_indent: number of extra spaces to indent the code to.
|
/mbedtls/docs/ |
A D | tls13-early-data.md | 77 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
|