Home
last modified time | relevance | path

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

123456

/mbedtls-3.6.0/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 …]
Dentropy_poll.c151 FILE *file; in mbedtls_platform_entropy_poll() local
170 ((void) file); in mbedtls_platform_entropy_poll()
181 file = fopen("/dev/urandom", "rb"); in mbedtls_platform_entropy_poll()
182 if (file == NULL) { in mbedtls_platform_entropy_poll()
187 mbedtls_setbuf(file, NULL); in mbedtls_platform_entropy_poll()
189 read_len = fread(output, 1, len, file); in mbedtls_platform_entropy_poll()
191 fclose(file); in mbedtls_platform_entropy_poll()
195 fclose(file); in mbedtls_platform_entropy_poll()
/mbedtls-3.6.0/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.function11 void string_debug(void *data, int level, const char *file, int line, const char *str)
17 memcpy(p, file, strlen(file));
18 p += strlen(file);
54 void debug_print_msg_threshold(int threshold, int level, char *file,
79 mbedtls_debug_print_msg(&ssl, level, file, line,
92 void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
115 mbedtls_debug_print_ret(&ssl, 0, file, line, text, value);
127 void mbedtls_debug_print_buf(char *file, int line, char *text,
150 mbedtls_debug_print_buf(&ssl, 0, file, line, text, data->x, data->len);
162 void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
[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
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.
388 * Ignore errors: writing the outcome file is on a best-effort basis. */
438 * supplied or default data file.
[all …]
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_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 …]
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.
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);
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. */
/mbedtls-3.6.0/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-3.6.0/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 …]
/mbedtls-3.6.0/scripts/
Dgenerate_driver_wrappers.py63 with open(file=os.path.join(output_dir, os.path.splitext(template_file_name)[0]),
86 " for driver " + driver_prefix, str(err), file=sys.stderr)
96 " ".format(driverjson_data, _schema, str(err)), file=sys.stderr)
102 with open(file=driver_file, mode='r', encoding='UTF-8') as f:
129 with open(file=file_path, mode='r', encoding='UTF-8') as file:
130 driver_schema[key] = json.load(file)
142 with open(file=os.path.join(json_directory, jsondriver_list),
152 def trace_exception(e: Exception, file=sys.stderr) -> None: argument
156 ), 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-3.6.0/include/mbedtls/
Ddebug.h163 const char *file, int line,
182 const char *file, int line,
203 const char *file, int line, const char *text,
224 const char *file, int line,
246 const char *file, int line,
267 const char *file, int line,
298 const char *file, int line,
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()
/mbedtls-3.6.0/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-3.6.0/tests/
DCMakeLists.txt17 file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/suites)
56 # Derive generated file paths in the build directory. The generated data
65 foreach(file ${base_bignum_generated_data_files})
66 list(APPEND bignum_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
68 foreach(file ${base_ecp_generated_data_files})
69 list(APPEND ecp_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
71 foreach(file ${base_psa_generated_data_files})
72 list(APPEND psa_generated_data_files ${CMAKE_CURRENT_BINARY_DIR}/suites/${file})
134 foreach(file ${all_generated_data_files})
135 link_to_source(${file})
[all …]
/mbedtls-3.6.0/tests/src/
Dhelpers.c310 const char *file, int line) in mbedtls_test_err_add_check() argument
329 line, file); in mbedtls_test_err_add_check()
335 line, file); in mbedtls_test_err_add_check()
341 line, file); in mbedtls_test_err_add_check()
347 line, file); in mbedtls_test_err_add_check()
350 line, file); in mbedtls_test_err_add_check()
/mbedtls-3.6.0/programs/pkey/
Dgen_key.c34 FILE *file; in dev_random_entropy_poll() local
41 file = fopen("/dev/random", "rb"); in dev_random_entropy_poll()
42 if (file == NULL) { in dev_random_entropy_poll()
48 ret = fread(p, 1, left, file); in dev_random_entropy_poll()
49 if (ret == 0 && ferror(file)) { in dev_random_entropy_poll()
50 fclose(file); in dev_random_entropy_poll()
58 fclose(file); in dev_random_entropy_poll()
/mbedtls-3.6.0/tests/scripts/
Dgen_gcm_encrypt.pl11 my $file = shift;
13 open(TEST_DATA, "$file") or die "Opening test cases '$file': $!";

123456