Home
last modified time | relevance | path

Searched refs:expected (Results 1 – 25 of 65) sorted by relevance

123

/mbedtls/tests/suites/
A Dtest_suite_constant_time.function42 TEST_EQUAL(mbedtls_ct_bool(v), expected);
63 TEST_EQUAL(mbedtls_ct_uint_ne(x, y), expected);
122 int expected = c ? t : f;
145 mbedtls_ct_uint_t expected = c ? t : f;
156 mbedtls_ct_bool(expected));
342 TEST_CALLOC(expected, size + offset);
348 expected[i] = eq ? 1 : 0xff;
369 expected[i] = eq ? 1 : 0xff;
390 expected[i] = eq ? 1 : 2;
411 expected[i] = 2;
[all …]
A Dtest_suite_alignment.function64 uint64_t expected = 0;
73 expected = raw_aligned_64;
77 TEST_EQUAL(r, expected);
107 uint64_t input = 0, expected = 0;
126 TEST_EQUAL(r, expected);
169 uint8_t expected = b;
202 uint8_t expected = b;
223 uint8_t expected = b;
290 uint64_t expected = 0;
294 expected |= b << shift;
[all …]
A Dtest_suite_psa_crypto_low_hash.function27 data_t *expected)
31 size_t output_size = expected->len;
39 ASSERT_COMPARE(expected->x, expected->len, output, length);
44 output_size = expected->len + 1;
49 ASSERT_COMPARE(expected->x, expected->len, output, length);
167 void hash_empty(int alg_arg, data_t *expected)
171 size_t output_size = expected->len;
182 ASSERT_COMPARE(expected->x, expected->len, output, length);
191 ASSERT_COMPARE(expected->x, expected->len, output, length);
203 ASSERT_COMPARE(expected->x, expected->len, output, length);
A Dtest_suite_asn1write.function30 const data_t *expected, int ret)
34 if (data->size < expected->len) {
41 expected->x, expected->len);
57 void mbedtls_asn1_write_null(data_t *expected)
79 void mbedtls_asn1_write_bool(int val, data_t *expected)
107 void mbedtls_asn1_write_int(int val, data_t *expected)
136 void mbedtls_asn1_write_enum(int val, data_t *expected)
189 if (expected->len > 10 && data.size == 8) {
190 data.size = expected->len - 2;
246 if (expected->len > 10 && data.size == 8) {
[all …]
A Dtest_suite_platform_printf.function50 char *expected = NULL;
56 TEST_CALLOC(expected, n + 1);
57 expected[0] = '7';
58 memset(expected + 1, 'f', sizeof(value) * 2 - 1);
62 TEST_MEMORY_COMPARE(expected, n + 1, output, n + 1);
68 mbedtls_free(expected);
A Dtest_suite_dhm.function6 const mbedtls_mpi *expected)
13 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&actual, expected) == 0);
22 * syntax and check that the value is the expected one (taken from the
24 static int check_dhm_param_output(const mbedtls_mpi *expected,
41 TEST_EQUAL(n, mbedtls_mpi_size(expected));
44 TEST_EQUAL(0, mbedtls_mpi_cmp_mpi(expected, &actual));
A Dtest_suite_base64.function37 signed char expected;
44 expected = -1;
46 expected = p - base64_digits;
52 TEST_EQUAL(actual, expected);
A Dtest_suite_cipher.function441 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
542 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
546 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx, NULL, 0));
616 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
620 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx_dec, NULL, 0));
720 int expected = (cipher_info->mode == MBEDTLS_MODE_GCM ||
724 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx_dec, NULL, 0));
725 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx_enc, NULL, 0));
816 int expected = (ctx.cipher_info->mode == MBEDTLS_MODE_GCM ||
820 TEST_EQUAL(expected, mbedtls_cipher_update_ad(&ctx, ad->x, ad->len));
[all …]
A Dtest_suite_psa_crypto_pake.function256 … !"One of the last psa_pake_input() calls should have returned the expected error.");
350 … !"One of the last psa_pake_input() calls should have returned the expected error.");
383 … !"One of the last psa_pake_input() calls should have returned the expected error.");
439 … !"One of the last psa_pake_input() calls should have returned the expected error.");
503 … !"One of the last psa_pake_input() calls should have returned the expected error.");
530 … !"One of the last psa_pake_input() calls should have returned the expected error.");
549 * - terminated successfully if this exact error was expected at this stage
550 * - terminated with failure otherwise (either no error was expected at this
551 * stage or a different error code was expected)
572 * The test succeeds if the returned error is exactly the expected one,
A Dtest_suite_psa_crypto_storage_format.function14 * Test that it has the expected representation.
36 /* Check that the key is represented as expected. */
161 /* Check that the injected key exists and looks as expected. */
228 * check that it has the expected format so that future versions
A Dtest_suite_psa_crypto_hash.function66 // manual comparison against expected MAC
69 // use psa_mac_verify to compare to expected MAC
A Dtest_suite_ecp.function851 // Read expected parameters
868 // Compare group with expected parameters
904 // Read group from buffer and compare with expected ID
1196 TEST_ASSERT(ret == expected);
1198 if (expected == 0) {
1230 expected);
1242 expected);
1366 TEST_CALLOC(actual, expected->len);
1371 if (expected->len == 0) {
1388 TEST_MEMORY_COMPARE(expected->x, expected->len,
[all …]
A Dtest_suite_ecdsa.function120 /* Check we generated the expected values */
496 void ecdsa_verify(int grp_id, char *x, char *y, char *r, char *s, data_t *content, int expected)
517 /* Test whether public key has expected validity */
519 expected == MBEDTLS_ERR_ECP_INVALID_KEY ? MBEDTLS_ERR_ECP_INVALID_KEY : 0);
524 TEST_EQUAL(result, expected);
A Dtest_suite_aes.function92 void aes_ctr(data_t *key, data_t *ictr, data_t *pt, data_t *ct, int expected)
105 // expected result is always success on zero-length input, so skip len == 0 if expecting failure
106 for (size_t len = (expected == 0 ? 0 : 1); len <= pt->len; len++) {
121 TEST_ASSERT(!!memcmp(output, ct->x, len) == expected);
126 TEST_ASSERT(!!memcmp(output, pt->x, len) == expected);
A Dtest_suite_lmots.data91 # alters the random value (C) of the signature, and is expected to fail to
97 # sets an invalid LMOTS type (0x5), and is expected to fail to
103 # sets an invalid LMOTS type (0x3), and is expected to fail to
A Dtest_suite_ecdh.function371 data_t *expected)
411 TEST_ASSERT(shared_secret_length == expected->len);
412 TEST_ASSERT(memcmp(expected->x, shared_secret,
A Dtest_suite_psa_crypto_slot_management.function280 * exist. Otherwise check that it still exists and has the expected
552 /* Test that the target slot has the expected content. */
897 * that they have the expected value and destroy them. In that process,
982 * expected value. Then, destroy it.
1010 * expected values.
1022 * Check we can export the persistent key and that it have the expected
A Dtest_suite_bignum_core.function13 * \param[in] S Little-endian presentation of the expected sum.
89 * \param[in] S Little-endian presentation of the expected sum.
591 mbedtls_mpi_uint *S = NULL; /* expected result */
624 mbedtls_mpi_uint *x = NULL; /* expected */
815 * The data file contains the expected result for sizeof(mbedtls_mpi_uint) == 8;
850 mbedtls_mpi_init(&X4); /* expected result, sizeof(mbedtls_mpi_uint) == 4 */
851 mbedtls_mpi_init(&X8); /* expected result, sizeof(mbedtls_mpi_uint) == 8 */
1001 /* Calculated rr matches expected value */
1093 * expected value. Bytes above wanted_bytes must be zero. */
A Dtest_suite_psa_crypto_se_driver_hal.function78 * case, the test driver code is expected to have called mbedtls_test_fail()
597 /* Check that the persistent data of a driver has its expected content. */
914 /* Test that the key was created in the expected slot. */
946 /* Test that the key was created in the expected slot. */
1055 /* Test that the key was created in the expected slot. */
1059 * including the expected slot. */
1500 /* Test that the key exists and has the expected attributes. */
/mbedtls/tests/scripts/
A Dtest_generate_test_code.py196 expected = '''
203 self.assertEqual(code, expected)
213 expected = '''
220 self.assertEqual(code, expected)
229 expected = '''
251 expected = '''
266 expected = '''
391 expected = ['MBEDTLS_ECP_C']
1401 expected = """
1419 expected = """
[all …]
A Drun-metatests.sh10 metatest is expected to report a failure. The final line should be
/mbedtls/docs/architecture/testing/
A Ddriver-interface-test-strategy.md25 …the proper function is called, that it receives the expected inputs and that it produces the expec…
41 …ons involve multiple driver methods; these should validate that all the expected driver methods ar…
45 … register multiple drivers with a key in each driver and check that the expected driver is called.…
46 …cture with multiple lifetime values and check that the driver receives the expected lifetime value.
56expected inputs reach the driver. This may be implicit in a test that checks the outputs if the on…
70 * Check that the storage ends up in the expected state. At least make sure that no intermediate fil…
90 * Check both that the storage has the expected content (this can be done by e.g. using a key that i…
A Dpsa-storage-format-testing.md23expected state of the storage after the key is created. The test case creates a key as indicated b…
25 In addition, the test case also loads the key and checks that it has the expected data and metadata…
39 … the corresponding test cases in load-only mode: create a file with the expected content, load it …
62 …ven identifier (using `psa_import_key`) and verify that a file with the expected name is created, …
68 …th `psa_import_key`. Read the file content and validate that it has the expected layout, deduced f…
/mbedtls/docs/architecture/psa-migration/
A Dtesting.md43 (`mbedtls_pk_get_type()` etc.) work and the functions that are expected to
44 fail (`mbedtls_pk_verify()` etc) return the expected error.
46 check that signature generation works as expected
48 exporting (writing out) the public part of the key works as expected and
49 that exporting the private key fails as expected.
/mbedtls/programs/psa/
A Dcrypto_examples.c22 #define ASSERT_STATUS(actual, expected) \ argument
25 if ((actual) != (expected)) \
29 (psa_status_t) actual, (psa_status_t) expected); \

Completed in 31 milliseconds

123