Home
last modified time | relevance | path

Searched refs:output_len (Results 1 – 25 of 37) sorted by relevance

12

/mbedtls-3.6.0/tests/suites/
Dtest_suite_nist_kw.function25 size_t output_len, i;
45 ciphertext1, &output_len,
47 TEST_ASSERT(output_len == sizeof(ciphertext1));
55 ciphertext1, output_len,
56 plaintext, &output_len,
59 TEST_ASSERT(output_len == sizeof(plaintext));
71 output_len = sizeof(ciphertext1);
80 ciphertext1, &output_len,
82 TEST_ASSERT(output_len == sizeof(ciphertext1));
86 ciphertext2, &output_len,
[all …]
Dtest_suite_pkcs1_v21.function69 size_t output_len;
103 &output_len, message_str->x,
109 &output_len, message_str->x,
113 TEST_MEMORY_COMPARE(output, output_len, result_str->x, result_str->len);
Dtest_suite_psa_crypto_pake.function606 size_t output_len = 0;
644 output_buffer, 0, &output_len),
729 &output_len),
734 output_buffer, buf_size, &output_len),
739 output_buffer, buf_size, &output_len),
744 output_buffer, buf_size, &output_len),
747 TEST_ASSERT(output_len > 0);
752 &output_len),
757 output_buffer, size_zk_public - 1, &output_len),
759 output_buffer, buf_size, &output_len)),
Dtest_suite_pkcs1_v15.function74 size_t output_len;
105 &output_len, message_str->x,
111 &output_len, message_str->x,
115 output_len,
Dtest_suite_gcm.function445 size_t output_len = input->len - 1;
451 TEST_CALLOC(output, output_len);
453 mbedtls_gcm_update(&ctx, input->x, input->len, output, output_len, &olen));
/mbedtls-3.6.0/programs/psa/
Dcrypto_examples.c55 size_t *output_len) in cipher_operation() argument
60 *output_len = 0; in cipher_operation()
67 bytes_to_write, output + *output_len, in cipher_operation()
68 output_size - *output_len, &len); in cipher_operation()
72 *output_len += len; in cipher_operation()
75 status = psa_cipher_finish(operation, output + *output_len, in cipher_operation()
76 output_size - *output_len, &len); in cipher_operation()
78 *output_len += len; in cipher_operation()
93 size_t *output_len) in cipher_encrypt() argument
107 output, output_size, output_len); in cipher_encrypt()
[all …]
/mbedtls-3.6.0/library/
Dssl_client.c446 size_t output_len; /* Length of buffer used by function */ in ssl_write_client_hello_body() local
546 &output_len); in ssl_write_client_hello_body()
550 p += output_len; in ssl_write_client_hello_body()
580 ret = ssl_write_hostname_ext(ssl, p, end, &output_len); in ssl_write_client_hello_body()
584 p += output_len; in ssl_write_client_hello_body()
588 ret = ssl_write_alpn_ext(ssl, p, end, &output_len); in ssl_write_client_hello_body()
592 p += output_len; in ssl_write_client_hello_body()
598 &output_len); in ssl_write_client_hello_body()
602 p += output_len; in ssl_write_client_hello_body()
626 &output_len); in ssl_write_client_hello_body()
[all …]
Dpkcs12.c126 size_t *output_len);
136 size_t output_len = 0; in mbedtls_pkcs12_pbe() local
144 &output_len); in mbedtls_pkcs12_pbe()
153 size_t *output_len) in mbedtls_pkcs12_pbe_ext() argument
235 output, output_len)) != 0) { in mbedtls_pkcs12_pbe_ext()
239 if ((ret = mbedtls_cipher_finish(&cipher_ctx, output + (*output_len), &finish_olen)) != 0) { in mbedtls_pkcs12_pbe_ext()
243 *output_len += finish_olen; in mbedtls_pkcs12_pbe_ext()
Dctr_drbg.c483 unsigned char *output, size_t output_len, in mbedtls_ctr_drbg_random_with_add() argument
494 if (output_len > MBEDTLS_CTR_DRBG_MAX_REQUEST) { in mbedtls_ctr_drbg_random_with_add()
521 while (output_len > 0) { in mbedtls_ctr_drbg_random_with_add()
539 use_len = (output_len > MBEDTLS_CTR_DRBG_BLOCKSIZE) in mbedtls_ctr_drbg_random_with_add()
540 ? MBEDTLS_CTR_DRBG_BLOCKSIZE : output_len; in mbedtls_ctr_drbg_random_with_add()
546 output_len -= use_len; in mbedtls_ctr_drbg_random_with_add()
562 size_t output_len) in mbedtls_ctr_drbg_random() argument
573 ret = mbedtls_ctr_drbg_random_with_add(ctx, output, output_len, NULL, 0); in mbedtls_ctr_drbg_random()
Dcipher.c814 static void add_pkcs_padding(unsigned char *output, size_t output_len, in add_pkcs_padding() argument
817 size_t padding_len = output_len - data_len; in add_pkcs_padding()
859 size_t output_len, size_t data_len) in add_one_and_zeros_padding() argument
861 size_t padding_len = output_len - data_len; in add_one_and_zeros_padding()
903 size_t output_len, size_t data_len) in add_zeros_and_len_padding() argument
905 size_t padding_len = output_len - data_len; in add_zeros_and_len_padding()
911 output[output_len - 1] = (unsigned char) padding_len; in add_zeros_and_len_padding()
950 size_t output_len, size_t data_len) in add_zeros_padding() argument
952 memset(output + data_len, 0, output_len - data_len); in add_zeros_padding()
1570 unsigned char *output, size_t output_len, in mbedtls_cipher_auth_encrypt_ext() argument
[all …]
Dpkcs5.c107 size_t *output_len);
116 size_t output_len = 0; in mbedtls_pkcs5_pbes2() local
123 datalen, output, SIZE_MAX, &output_len); in mbedtls_pkcs5_pbes2()
131 size_t *output_len) in mbedtls_pkcs5_pbes2_ext() argument
253 data, datalen, output, output_len)) != 0) { in mbedtls_pkcs5_pbes2_ext()
Dssl_tls13_server.c2087 size_t output_len; in ssl_tls13_write_server_hello_body() local
2170 ssl, p, end, &output_len)) != 0) { in ssl_tls13_write_server_hello_body()
2175 p += output_len; in ssl_tls13_write_server_hello_body()
2179 ret = ssl_tls13_write_hrr_key_share_ext(ssl, p, end, &output_len); in ssl_tls13_write_server_hello_body()
2181 ret = ssl_tls13_write_key_share_ext(ssl, p, end, &output_len); in ssl_tls13_write_server_hello_body()
2186 p += output_len; in ssl_tls13_write_server_hello_body()
2191 ret = ssl_tls13_write_server_pre_shared_key_ext(ssl, p, end, &output_len); in ssl_tls13_write_server_hello_body()
2197 p += output_len; in ssl_tls13_write_server_hello_body()
2370 size_t output_len; in ssl_tls13_write_encrypted_extensions_body() local
2380 ((void) output_len); in ssl_tls13_write_encrypted_extensions_body()
[all …]
Dssl_tls13_client.c907 size_t output_len; in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext() local
961 &output_len); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
964 0, &output_len); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
970 p += output_len; in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
979 &output_len); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
984 p += output_len; in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
1022 size_t output_len; in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext() local
1036 &output_len); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1040 p += output_len; in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1049 &output_len); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
[all …]
/mbedtls-3.6.0/programs/fuzz/
Dcommon.c59 int dummy_random(void *p_rng, unsigned char *output, size_t output_len) in dummy_random() argument
68 ret = mbedtls_ctr_drbg_random(p_rng, output, output_len); in dummy_random()
77 for (i = 0; i < output_len; i++) { in dummy_random()
Dcommon.h22 int dummy_random(void *p_rng, unsigned char *output, size_t output_len);
/mbedtls-3.6.0/include/mbedtls/
Dctr_drbg.h487 unsigned char *output, size_t output_len,
515 unsigned char *output, size_t output_len);
Dpkcs12.h144 size_t *output_len);
Dpkcs5.h128 size_t *output_len);
Dcipher.h1120 unsigned char *output, size_t output_len,
1176 unsigned char *output, size_t output_len,
Dhmac_drbg.h347 unsigned char *output, size_t output_len,
Dccm.h468 size_t *output_len);
/mbedtls-3.6.0/programs/ssl/
Dssl_test_lib.c165 int rng_get(void *p_rng, unsigned char *output, size_t output_len) in rng_get() argument
170 output, output_len); in rng_get()
175 return mbedtls_ctr_drbg_random(&rng->drbg, output, output_len); in rng_get()
177 return mbedtls_hmac_drbg_random(&rng->drbg, output, output_len); in rng_get()
Dssl_test_lib.h196 int rng_get(void *p_rng, unsigned char *output, size_t output_len);
/mbedtls-3.6.0/programs/test/
Dselftest.c216 size_t output_len = 0; in create_entropy_seed_file() local
230 &output_len); in create_entropy_seed_file()
235 if (MBEDTLS_ENTROPY_BLOCK_SIZE != output_len) { in create_entropy_seed_file()
/mbedtls-3.6.0/tests/src/test_helpers/
Dssl_helpers.c17 static int rng_get(void *p_rng, unsigned char *output, size_t output_len) in rng_get() argument
20 for (size_t i = 0; i < output_len; i++) { in rng_get()
192 unsigned char *output, size_t output_len) in mbedtls_test_ssl_buffer_get() argument
200 if (output == NULL && output_len == 0) { in mbedtls_test_ssl_buffer_get()
204 if (buf->content_length < output_len) { in mbedtls_test_ssl_buffer_get()
205 output_len = buf->content_length; in mbedtls_test_ssl_buffer_get()
210 if (buf->start + output_len > buf->capacity) { in mbedtls_test_ssl_buffer_get()
211 overflow = (buf->start + output_len) % buf->capacity; in mbedtls_test_ssl_buffer_get()
215 memcpy(output, buf->buffer + buf->start, output_len - overflow); in mbedtls_test_ssl_buffer_get()
216 memcpy(output + output_len - overflow, buf->buffer, overflow); in mbedtls_test_ssl_buffer_get()
[all …]

12