Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 132) sorted by relevance

123456

/mbedtls-latest/library/
Ddebug.c35 const char *file, int line, in debug_send_line() argument
46 ssl->conf->f_dbg(ssl->conf->p_dbg, level, file, line, idstr); in debug_send_line()
48 ssl->conf->f_dbg(ssl->conf->p_dbg, level, file, line, str); in debug_send_line()
54 const char *file, int line, in mbedtls_debug_print_msg() argument
84 debug_send_line(ssl, level, file, line, str); in mbedtls_debug_print_msg()
88 const char *file, int line, in mbedtls_debug_print_ret() argument
112 debug_send_line(ssl, level, file, line, str); in mbedtls_debug_print_ret()
116 const char *file, int line, const char *text, in mbedtls_debug_print_buf() argument
133 debug_send_line(ssl, level, file, line, str); in mbedtls_debug_print_buf()
144 debug_send_line(ssl, level, file, line, str); in mbedtls_debug_print_buf()
[all …]
Dplatform.c295 FILE *file; in mbedtls_platform_std_nv_seed_read() local
298 if ((file = fopen(MBEDTLS_PLATFORM_STD_NV_SEED_FILE, "rb")) == NULL) { in mbedtls_platform_std_nv_seed_read()
303 mbedtls_setbuf(file, NULL); in mbedtls_platform_std_nv_seed_read()
305 if ((n = fread(buf, 1, buf_len, file)) != buf_len) { in mbedtls_platform_std_nv_seed_read()
306 fclose(file); in mbedtls_platform_std_nv_seed_read()
311 fclose(file); in mbedtls_platform_std_nv_seed_read()
317 FILE *file; in mbedtls_platform_std_nv_seed_write() local
320 if ((file = fopen(MBEDTLS_PLATFORM_STD_NV_SEED_FILE, "w")) == NULL) { in mbedtls_platform_std_nv_seed_write()
325 mbedtls_setbuf(file, NULL); in mbedtls_platform_std_nv_seed_write()
327 if ((n = fwrite(buf, 1, buf_len, file)) != buf_len) { in mbedtls_platform_std_nv_seed_write()
[all …]
Ddebug_internal.h31 const char *file, int line,
50 const char *file, int line,
71 const char *file, int line, const char *text,
92 const char *file, int line,
114 const char *file, int line,
135 const char *file, int line,
166 const char *file, int line,
Dentropy_poll.c153 FILE *file; in mbedtls_platform_entropy_poll() local
172 ((void) file); in mbedtls_platform_entropy_poll()
183 file = fopen("/dev/urandom", "rb"); in mbedtls_platform_entropy_poll()
184 if (file == NULL) { in mbedtls_platform_entropy_poll()
189 mbedtls_setbuf(file, NULL); in mbedtls_platform_entropy_poll()
191 read_len = fread(output, 1, len, file); in mbedtls_platform_entropy_poll()
193 fclose(file); in mbedtls_platform_entropy_poll()
197 fclose(file); in mbedtls_platform_entropy_poll()
/mbedtls-latest/docs/architecture/
Dmbed-crypto-storage-specification.md23 * [PSA ITS](#file-namespace-on-its-for-0.1.0)
24 * [C stdio](#file-namespace-on-stdio-for-0.1.0)
28 * [Persistent transparent keys](#key-file-format-for-0.1.0) designated by a [slot number](#key-name…
29 * [Nonvolatile random seed](#nonvolatile-random-seed-file-format-for-0.1.0) on ITS only.
33 …olatile random seed file produced with Mbed OS 5.11.x and is upgraded to a later version of Mbed O…
35 We do not make any promises regarding key storage, or regarding the nonvolatile random seed file on…
39file whose name is constructed from the key identifier. The way in which the file name is construc…
49 ### Key file format for 0.1.0
53 The layout of a key file is:
64 ### Nonvolatile random seed file format for 0.1.0
[all …]
Dpsa-storage-resilience.md21 ## Assumptions on the underlying file storage
25 * `set()` writes a whole file (either creating it, or replacing the previous content).
26 * `remove()` removes a file (returning a specific error code if the file does not exist).
30 …mic, the content of a file is always a version that was previously passed to `set()`. We do not tr…
40 …ence properties of the underyling storage](#assumptions-on-the-underlying-file-storage). We do not…
111 The PSA ITS API does not support enumerating files in storage: an ITS call can only access one file
115 … underlying file storage](#assumptions-on-the-underlying-file-storage), each atomic operation in t…
117 …st transform the internal storage from a state where file `id` does not exist, to a state where fi…
121file `id` cannot be used for this purpose because there is no way to enumerate all keys (and even …
123 * Write (create or update) a file `t` referencing `id`.
[all …]
/mbedtls-latest/tests/suites/
Dtest_suite_hmac_drbg.misc.data37 HMAC_DRBG write/update seed file SHA-1 [#1]
41 HMAC_DRBG write/update seed file SHA-1 [#2]
43 hmac_drbg_seed_file:MBEDTLS_MD_SHA1:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR
45 HMAC_DRBG write/update seed file SHA-224 [#1]
49 HMAC_DRBG write/update seed file SHA-224 [#2]
51 hmac_drbg_seed_file:MBEDTLS_MD_SHA224:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR
53 HMAC_DRBG write/update seed file SHA-256 [#1]
57 HMAC_DRBG write/update seed file SHA-256 [#2]
59 hmac_drbg_seed_file:MBEDTLS_MD_SHA256:"no_such_dir/file":MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR
61 HMAC_DRBG write/update seed file SHA-384 [#1]
[all …]
Dtest_suite_debug.function12 static void string_debug(void *data, int level, const char *file, int line, const char *str)
18 memcpy(p, file, strlen(file));
19 p += strlen(file);
55 void debug_print_msg_threshold(int threshold, int level, char *file,
81 mbedtls_debug_print_msg(&ssl, level, file, line,
94 void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
118 mbedtls_debug_print_ret(&ssl, 0, file, line, text, value);
130 void mbedtls_debug_print_buf(char *file, int line, char *text,
154 mbedtls_debug_print_buf(&ssl, 0, file, line, text, data->x, data->len);
166 void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
[all …]
Dtest_suite_md.data347 generic MD5 Hash file #1
351 generic MD5 Hash file #2
355 generic MD5 Hash file #3
359 generic MD5 Hash file #4
363 generic RIPEMD160 Hash file #0 (from paper)
367 generic RIPEMD160 Hash file #1
371 generic RIPEMD160 Hash file #2
375 generic RIPEMD160 Hash file #3
379 generic RIPEMD160 Hash file #4
931 generic SHA3-224 Hash file #1
[all …]
Dhost_test.function63 " files... One or more test data files. If no file is\n" \
65 " file is used:\n" \
75 * \brief Read a line from the passed file pointer.
318 /** \brief Write the description of the test case to the outcome CSV file.
320 * \param outcome_file The file to write to.
360 * Ignore errors: writing the outcome file is on a best-effort basis. */
365 /** \brief Write the result of the test case to the outcome CSV file.
367 * \param outcome_file The file to write to.
386 * Ignore errors: writing the outcome file is on a best-effort basis. */
481 * supplied or default data file.
[all …]
Dtest_suite_net.function22 /** Open a file on the given file descriptor.
28 * On success, it refers to the opened file (\p wanted_fd).
29 * \param wanted_fd The desired file descriptor.
77 /* Test that mbedtls_net_poll does not misbehave when given a file
90 /* On many systems, by default, the maximum permitted file descriptor
94 * If the limit can't be raised, a file descriptor opened by the
97 * A file descriptor could still be higher than FD_SETSIZE if it was
116 * file descriptors greater or equal to FD_SETSIZE. So we expect to hit
Dmain_test.function5 * This file has been machine generated using the script:
8 * Test file : __MBEDTLS_TEST_TEMPLATE__TEST_FILE
10 * The following files were used to create this file.
12 * Main code file : __MBEDTLS_TEST_TEMPLATE__TEST_MAIN_FILE
13 * Platform code file : __MBEDTLS_TEST_TEMPLATE__TEST_PLATFORM_FILE
14 * Helper file : __MBEDTLS_TEST_TEMPLATE__TEST_COMMON_HELPER_FILE
15 * Test suite file : __MBEDTLS_TEST_TEMPLATE__TEST_CASE_FILE
233 extern void (*mbedtls_test_hook_test_fail)(const char *test, int line, const char *file);
241 * using the default data file. This allows running the executable
243 * the .datax file as well as data files used by test cases
[all …]
Dtest_suite_psa_crypto_entropy.function17 /* Check the entropy seed file.
20 * If 0, the file must not exist.
23 * the entropy seed file exists and has exactly this size,
24 * or \p expected_size is zero and the file does not exist.
26 * the entropy seed file does not exist or has a different size,
27 * or \p expected_size is zero but the file exists.
30 * \note We enforce that the seed is in a specific ITS file.
38 * file. If this test assertion fails, you've presumably broken backward
58 /* Remove the entropy seed file.
Dtest_suite_psa_its.function3 /* This test file is specific to the ITS implementation in PSA Crypto
4 * on top of stdio. It expects to know what the stdio name of a file is
50 * We ignore the error if the file exists but remove() fails because
51 * it can't be checked portably (except by attempting to open the file
53 * remove() on an existing file is very unlikely anyway and would not
162 "Content of file 0x%08lx", (unsigned long) uid);
168 "Content of file 0x%08lx", (unsigned long) uid);
260 /* Overwrite the 1st byte of the file, the ITS magic number */
266 /* Reopen file and truncate it to 0 byte by specifying the 'w' flag */
278 /* Check if the file is really deleted. */
Dtest_suite_entropy.data10 Entropy write/update seed file: good
13 Entropy write/update seed file: nonexistent
14 entropy_seed_file:"no_such_dir/file":MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR
16 Entropy write/update seed file: base NV seed file
Dtest_suite_psa_crypto_persistent_key.data87 import/export persistent raw key file not exist: 1 byte
90 import/export persistent key RSA public key file not exist: 1024-bit
94 import/export persistent key RSA keypair file not exist: 1024-bit
113 import/export persistent raw key file not exist with restart: 1 byte
116 import/export persistent key RSA public key file not exist with restart: 1024-bit
120 import/export persistent key RSA keypair file not exist with restart: 1024-bit
/mbedtls-latest/docs/architecture/testing/
Dtest-framework.md13 … the test does. The first non-comment line of each paragraph in a `.data` file is the test descrip…
16 … that process test descriptions (`generate_test_code.py`, [outcome file](#outcome-file) tools) sim…
17 * Test descriptions must be unique within a `.data` file. If you can't think of a better descriptio…
18 …a failure log to the test data. Avoid confusion between cases in the [outcome file](#outcome-file).
45 ### Outcome file
47 #### Generating an outcome file argument
49 … outcome file**. This feature is enabled if the environment variable `MBEDTLS_TEST_OUTCOME_FILE` i…
51 If you run `all.sh --outcome-file test-outcome.csv`, this collects the outcome of all the test case…
53 #### Outcome file format argument
55 The outcome file is in a CSV format using `;` (semicolon) as the delimiter and no quoting. This mea…
[all …]
Dpsa-storage-format-testing.md39 …n we should keep the corresponding test cases in load-only mode: create a file with the expected c…
43 …e interface. The state of the storage is a mapping from file identifier (a 64-bit number) to file
46 * The [random generator injected seed or state file](#random-generator-state) (`PSA_CRYPTO_ITS_RAND…
47 * [Storage transaction file](#storage-transaction-resumption).
52 …io. This document addresses the test strategy for [PSA ITS over file](#psa-its-over-file) in a sep…
60 Objective: test that the key file name corresponds to the key identifier.
62 Method: Create a key with a given identifier (using `psa_import_key`) and verify that a file with t…
66 Objective: test the format of the key file: which field goes where and how big it is.
68 Method: Create a key with certain metadata with `psa_import_key`. Read the file content and validat…
125 ## PSA ITS over file
/mbedtls-latest/scripts/
Dgenerate_driver_wrappers.py65 with open(file=os.path.join(output_dir, os.path.splitext(template_file_name)[0]),
88 " for driver " + driver_prefix, str(err), file=sys.stderr)
98 " ".format(driverjson_data, _schema, str(err)), file=sys.stderr)
104 with open(file=driver_file, mode='r', encoding='UTF-8') as f:
131 with open(file=file_path, mode='r', encoding='UTF-8') as file:
132 driver_schema[key] = json.load(file)
144 with open(file=os.path.join(json_directory, jsondriver_list),
154 def trace_exception(e: Exception, file=sys.stderr) -> None: argument
158 ), file)
Dgenerate_errors.pl54 foreach my $file (@files) {
55 open(FILE, '<:crlf', $file) or die("$0: $file: $!");
77 die "Description neither before nor after $name in $file\n"
79 die "Description both before and after $name in $file\n"
89 my $include_name = $file;
/mbedtls-latest/docs/proposed/
Dpsa-driver-wrappers-codegen-migration-guide.md1 Migrating to an auto generated psa_crypto_driver_wrappers.h file
4 This document describes how to migrate to the auto generated psa_crypto_driver_wrappers.h file.
24 …a2 ) to render templates based on drivers that are defined using a Driver description JSON file(s).
31 (2) The auto generation is based on the template file at **scripts/data_files/driver_templates/psa_…
32 (3) The driver JSONS to be used for generating the psa_crypto_driver_wrappers.h file can be found a…
33 …es a need to patch psa_crypto_driver_wrappers.h file, the user will need to patch into the templat…
40 The JSON file 'driverlist.json' is meant to be edited by the user to reflect the drivers one wants …
Dpsa-driver-developer-guide.md26file**. The driver description file declares which functions the driver implements and what crypto…
28 The concrete syntax for a driver description file is JSON. The structure of this JSON file is speci…
32 * A driver description file (in JSON format).
33 …the driver description. The names of these header files is declared in the driver description file.
34 * An object file compiled for the target platform defining the functions required by the driver des…
/mbedtls-latest/tests/
DCMakeLists.txt18 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/suites)
69 # Derive generated file paths in the build directory. The generated data
80 foreach(file ${base_bignum_generated_data_files})
81 list(APPEND bignum_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
83 foreach(file ${base_config_generated_data_files})
84 list(APPEND config_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
86 foreach(file ${base_ecp_generated_data_files})
87 list(APPEND ecp_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
89 foreach(file ${base_psa_generated_data_files})
90 list(APPEND psa_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
[all …]
/mbedtls-latest/programs/pkey/
Dgen_key.c45 FILE *file; in dev_random_entropy_poll() local
52 file = fopen("/dev/random", "rb"); in dev_random_entropy_poll()
53 if (file == NULL) { in dev_random_entropy_poll()
59 ret = fread(p, 1, left, file); in dev_random_entropy_poll()
60 if (ret == 0 && ferror(file)) { in dev_random_entropy_poll()
61 fclose(file); in dev_random_entropy_poll()
69 fclose(file); in dev_random_entropy_poll()
/mbedtls-latest/include/mbedtls/
Derror.h143 const char *file, int line) in mbedtls_error_add() argument
147 (*mbedtls_test_hook_error_add)(high, low, file, line); in mbedtls_error_add()
150 (void) file; in mbedtls_error_add()

123456