Lines Matching refs:code

30 …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:
77 * In the test function's cleanup code, restore the global function pointers to their default value.
87 …at are solely present for test purposes, since these increase the attack surface and the code size.
109 … to hardware errors or to active attacks on trusted storage. How does the code cope if some storag…
115 When code should clean up resources, how do we know that they have truly been cleaned up?
143 … not useful in production. These interfaces have costs: they increase the code size, the attack su…
160 …rfaces), but not all. In particular, the extra interfaces do increase the code size, the attack su…
176 …the same downside as public interfaces: the extra interfaces increase the code size and the attack…
203 | Effacement | ++ Zero impact on the code |
209code that we want to have in the product for testing, but not in production, we can add a compile-…
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…
226 …When building in test mode, the code should have exactly the same behavior. Changing the behavior …
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 |
244 | | + Many properties come for free, but some require effort (e.g. the test code it…
248 …ing, we can use a debugger to read or modify the memory, or hook into the code at arbitrary points.
252 …iming). If we modify data structures in memory, we may do so in a way that the code doesn't expect.
254 …e things such as finding the place(s) in the binary corresponding to some place in the source code.
260 | Correctness | ++ The code is unmodified, and tested as compiled (so we even detect compiler-induc…
263 | Effacement | ++ Zero impact on the code |
266 | | !! Very tight coupling with the details of the source code and even with the co…
280 … cannot be tested by adding C code, because the danger is that the compiler optimizes the zeroizat…
288 …test function or test program must clean up after itself. Use the cleanup code (after the `exit` l…
296 Goal: test the absence of resource leaks in the PSA key store code, in particular that `psa_close_k…
298 …internal-interfaces)): in most tests involving PSA functions, the cleanup code explicitly calls `P…