Home
last modified time | relevance | path

Searched refs:mbedtls_calloc (Results 1 – 25 of 75) sorted by relevance

123

/mbedtls-3.7.0/tests/suites/
Dtest_suite_memory_buffer_alloc.function55 ptr_a = mbedtls_calloc(a_bytes, sizeof(char));
62 ptr_b = mbedtls_calloc(b_bytes, sizeof(char));
69 ptr_c = mbedtls_calloc(c_bytes, sizeof(char));
76 ptr_d = mbedtls_calloc(d_bytes, sizeof(char));
125 ptr_e = mbedtls_calloc(e_bytes, sizeof(char));
130 ptr_f = mbedtls_calloc(f_bytes, sizeof(char));
201 ptr_a = mbedtls_calloc(432, sizeof(char));
204 ptr_b = mbedtls_calloc(432, sizeof(char));
207 ptr_c = mbedtls_calloc(431, sizeof(char));
256 TEST_ASSERT(mbedtls_calloc(1,
Dtest_suite_nist_kw.function159 plaintext = mbedtls_calloc(1, in_len);
164 ciphertext = mbedtls_calloc(1, output_len);
207 plaintext = mbedtls_calloc(1, output_len);
211 ciphertext = mbedtls_calloc(1, in_len);
Dtest_suite_platform.data8 Check mbedtls_calloc overallocation
/mbedtls-3.7.0/programs/test/
Dselftest.c58 void *empty1 = mbedtls_calloc(0, 1); in calloc_self_test()
59 void *empty2 = mbedtls_calloc(0, 1); in calloc_self_test()
60 void *buffer1 = mbedtls_calloc(1, 1); in calloc_self_test()
61 void *buffer2 = mbedtls_calloc(1, 1); in calloc_self_test()
64 unsigned char *buffer3 = mbedtls_calloc(buffer_3_size, 1); in calloc_self_test()
65 unsigned char *buffer4 = mbedtls_calloc(buffer_4_size, 1); in calloc_self_test()
90 empty1 = mbedtls_calloc(1, 0); in calloc_self_test()
91 empty2 = mbedtls_calloc(1, 0); in calloc_self_test()
130 buffer1 = mbedtls_calloc(1, 1); in calloc_self_test()
/mbedtls-3.7.0/library/
Dmemory_buffer_alloc.c654 p = mbedtls_calloc(1, 1); in mbedtls_memory_buffer_alloc_self_test()
655 q = mbedtls_calloc(1, 128); in mbedtls_memory_buffer_alloc_self_test()
656 r = mbedtls_calloc(1, 16); in mbedtls_memory_buffer_alloc_self_test()
685 p = mbedtls_calloc(1, 1); in mbedtls_memory_buffer_alloc_self_test()
686 q = mbedtls_calloc(1, 128); in mbedtls_memory_buffer_alloc_self_test()
687 r = mbedtls_calloc(1, 16); in mbedtls_memory_buffer_alloc_self_test()
711 p = mbedtls_calloc(1, sizeof(buf) - sizeof(memory_header)); in mbedtls_memory_buffer_alloc_self_test()
714 TEST_ASSERT(mbedtls_calloc(1, 1) == NULL); in mbedtls_memory_buffer_alloc_self_test()
718 p = mbedtls_calloc(1, sizeof(buf) - 2 * sizeof(memory_header) - 16); in mbedtls_memory_buffer_alloc_self_test()
719 q = mbedtls_calloc(1, 16); in mbedtls_memory_buffer_alloc_self_test()
[all …]
Dasn1write.c385 cur = (mbedtls_asn1_named_data *) mbedtls_calloc(1, in mbedtls_asn1_store_named_data()
392 cur->oid.p = mbedtls_calloc(1, oid_len); in mbedtls_asn1_store_named_data()
402 cur->val.p = mbedtls_calloc(1, val_len); in mbedtls_asn1_store_named_data()
421 void *p = mbedtls_calloc(1, val_len); in mbedtls_asn1_store_named_data()
Dcipher_wrap.c123 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_gcm_context)); in gcm_ctx_alloc()
145 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_ccm_context)); in ccm_ctx_alloc()
249 mbedtls_aes_context *aes = mbedtls_calloc(1, sizeof(mbedtls_aes_context)); in aes_ctx_alloc()
495 mbedtls_aes_xts_context *xts_ctx = mbedtls_calloc(1, sizeof(*xts_ctx)); in xts_aes_ctx_alloc()
831 ctx = mbedtls_calloc(1, sizeof(mbedtls_camellia_context)); in camellia_ctx_alloc()
1249 ctx = mbedtls_calloc(1, sizeof(mbedtls_aria_context)); in aria_ctx_alloc()
1694 mbedtls_des_context *des = mbedtls_calloc(1, sizeof(mbedtls_des_context)); in des_ctx_alloc()
1714 des3 = mbedtls_calloc(1, sizeof(mbedtls_des3_context)); in des3_ctx_alloc()
1917 ctx = mbedtls_calloc(1, sizeof(mbedtls_chacha20_context)); in chacha20_ctx_alloc()
1994 ctx = mbedtls_calloc(1, sizeof(mbedtls_chachapoly_context)); in chachapoly_ctx_alloc()
[all …]
Dpsa_crypto_storage.c300 *key_data = mbedtls_calloc(1, *key_data_length); in psa_parse_key_data_from_storage()
335 storage_data = mbedtls_calloc(1, storage_data_length); in psa_save_persistent_key()
369 loaded_data = mbedtls_calloc(1, storage_data_length); in psa_load_persistent_key()
Dpsa_crypto_pake.c184 operation->password = mbedtls_calloc(1, password_len); in mbedtls_psa_pake_setup()
190 user = mbedtls_calloc(1, user_len); in mbedtls_psa_pake_setup()
196 peer = mbedtls_calloc(1, peer_len); in mbedtls_psa_pake_setup()
Dbignum_mod.c176 mbedtls_mpi_uint *T = mbedtls_calloc(N->limbs * 2 + 1, ciL); in mbedtls_mpi_mod_mul()
265 mbedtls_mpi_uint *working_memory = mbedtls_calloc(working_limbs, in mbedtls_mpi_mod_inv()
366 working_memory = mbedtls_calloc(r->limbs, sizeof(mbedtls_mpi_uint)); in mbedtls_mpi_mod_write()
Dlms.c494 tree = mbedtls_calloc((size_t) MERKLE_TREE_NODE_AM(ctx->params.type), in get_merkle_path()
589 ctx->ots_private_keys = mbedtls_calloc((size_t) MERKLE_TREE_LEAF_NODE_AM(ctx->params.type), in mbedtls_lms_generate_private_key()
598 ctx->ots_public_keys = mbedtls_calloc((size_t) MERKLE_TREE_LEAF_NODE_AM(ctx->params.type), in mbedtls_lms_generate_private_key()
658 tree = mbedtls_calloc((size_t) MERKLE_TREE_NODE_AM(priv_ctx->params.type), in mbedtls_lms_calculate_public_key()
Dbignum_mod_raw.c237 if ((T = (mbedtls_mpi_uint *) mbedtls_calloc(t_limbs, ciL)) == NULL) { in mbedtls_mpi_mod_raw_to_mont_rep()
254 if ((T = (mbedtls_mpi_uint *) mbedtls_calloc(t_limbs, ciL)) == NULL) { in mbedtls_mpi_mod_raw_from_mont_rep()
Dssl_cache.c186 cur = mbedtls_calloc(1, sizeof(mbedtls_ssl_cache_entry)); in ssl_cache_pick_writing_slot()
278 session_serialized = mbedtls_calloc(1, session_serialized_len); in mbedtls_ssl_cache_set()
Dx509_crl.c267 cur_entry->next = mbedtls_calloc(1, sizeof(mbedtls_x509_crl_entry)); in x509_get_entries()
311 crl->next = mbedtls_calloc(1, sizeof(mbedtls_x509_crl)); in mbedtls_x509_crl_parse_der()
329 p = mbedtls_calloc(1, buflen); in mbedtls_x509_crl_parse_der()
Dpkcs7.c408 mbedtls_calloc(1, sizeof(mbedtls_pkcs7_signer_info)); in pkcs7_get_signers_info_set()
566 pkcs7->raw.p = p = mbedtls_calloc(1, buflen); in mbedtls_pkcs7_parse_der()
674 hash = mbedtls_calloc(mbedtls_md_get_size(md_info), 1); in mbedtls_pkcs7_data_or_hash_verify()
Dpk_wrap.c182 buf = mbedtls_calloc(1, MBEDTLS_PK_RSA_PRV_DER_MAX_BYTES); in mbedtls_pk_psa_rsa_sign_ext()
456 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_rsa_context)); in rsa_alloc_wrap()
850 void *ctx = mbedtls_calloc(1, sizeof(eckey_restart_ctx)); in eckey_rs_alloc()
1083 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_ecp_keypair)); in eckey_alloc_wrap()
1222 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_ecdsa_restart_ctx)); in ecdsa_rs_alloc()
1368 void *ctx = mbedtls_calloc(1, sizeof(mbedtls_rsa_alt_context)); in rsa_alt_alloc_wrap()
Dssl_tls.c252 dst->peer_cert = mbedtls_calloc(1, sizeof(mbedtls_x509_crt)); in mbedtls_ssl_session_copy()
269 mbedtls_calloc(1, src->peer_cert_digest_len); in mbedtls_ssl_session_copy()
295 dst->ticket = mbedtls_calloc(1, src->ticket_len); in mbedtls_ssl_session_copy()
323 unsigned char *resized_buffer = mbedtls_calloc(1, len_new); in resize_buffer()
1072 ssl->transform_negotiate = mbedtls_calloc(1, sizeof(mbedtls_ssl_transform)); in ssl_handshake_init()
1077 ssl->session_negotiate = mbedtls_calloc(1, sizeof(mbedtls_ssl_session)); in ssl_handshake_init()
1081 ssl->handshake = mbedtls_calloc(1, sizeof(mbedtls_ssl_handshake_params)); in ssl_handshake_init()
1174 uint16_t *group_list = mbedtls_calloc(length + 1, sizeof(uint16_t)); in ssl_handshake_init()
1236 ssl->handshake->sig_algs = mbedtls_calloc(1, sig_algs_len + in ssl_handshake_init()
1418 ssl->in_buf = mbedtls_calloc(1, in_buf_len); in mbedtls_ssl_setup()
[all …]
Dssl_tls13_keys.c1248 transform_earlydata = mbedtls_calloc(1, sizeof(mbedtls_ssl_transform)); in mbedtls_ssl_tls13_compute_early_transform()
1501 shared_secret = mbedtls_calloc(1, shared_secret_len); in ssl_tls13_key_schedule_stage_handshake()
1720 transform_handshake = mbedtls_calloc(1, sizeof(mbedtls_ssl_transform)); in mbedtls_ssl_tls13_compute_handshake_transform()
1811 mbedtls_calloc(1, sizeof(mbedtls_ssl_transform)); in mbedtls_ssl_tls13_compute_application_transform()
1861 *psk = mbedtls_calloc(1, *psk_len); in mbedtls_ssl_tls13_export_handshake_psk()
Dpem.c419 if ((buf = mbedtls_calloc(1, len)) == NULL) { in mbedtls_pem_read_buffer()
511 ((encode_buf = mbedtls_calloc(1, use_len)) == NULL)) { in mbedtls_pem_write_buffer()
/mbedtls-3.7.0/include/mbedtls/
Dplatform.h142 #undef mbedtls_calloc
144 #define mbedtls_calloc MBEDTLS_PLATFORM_CALLOC_MACRO macro
148 extern void *mbedtls_calloc(size_t n, size_t size);
165 #undef mbedtls_calloc
167 #define mbedtls_calloc calloc
/mbedtls-3.7.0/tests/include/test/
Dmacros.h128 (pointer) = mbedtls_calloc((item_count), \
158 (pointer) = mbedtls_calloc((item_count), \
161 (pointer) = mbedtls_calloc(1, 1); \
178 (pointer) = mbedtls_calloc((item_count), \
/mbedtls-3.7.0/tests/src/test_helpers/
Dssl_helpers.c118 buf->buffer = (unsigned char *) mbedtls_calloc(capacity, in mbedtls_test_ssl_buffer_setup()
218 queue->messages = (size_t *) mbedtls_calloc(capacity, sizeof(size_t)); in mbedtls_test_ssl_message_queue_setup()
348 (mbedtls_test_ssl_buffer *) mbedtls_calloc( in mbedtls_test_mock_socket_connect()
360 (mbedtls_test_ssl_buffer *) mbedtls_calloc( in mbedtls_test_mock_socket_connect()
1296 CHK((key0 = mbedtls_calloc(1, keylen + 1)) != NULL); in mbedtls_test_ssl_build_transforms()
1297 CHK((key1 = mbedtls_calloc(1, keylen + 1)) != NULL); in mbedtls_test_ssl_build_transforms()
1356 CHK((md0 = mbedtls_calloc(1, maclen)) != NULL); in mbedtls_test_ssl_build_transforms()
1357 CHK((md1 = mbedtls_calloc(1, maclen)) != NULL); in mbedtls_test_ssl_build_transforms()
1705 session->peer_cert = mbedtls_calloc(1, sizeof(*session->peer_cert)); in mbedtls_test_ssl_tls12_populate_session()
1714 mbedtls_calloc(1, MBEDTLS_SSL_PEER_CERT_DIGEST_DFL_LEN); in mbedtls_test_ssl_tls12_populate_session()
[all …]
/mbedtls-3.7.0/tests/src/
Dbignum_helpers.c48 *pX = mbedtls_calloc(*plimbs, sizeof(**pX)); in mbedtls_test_read_mpi_core()
Dhelpers.c618 p = mbedtls_calloc(1, actual_len); in mbedtls_test_zero_alloc()
637 obuf = mbedtls_calloc(1, *olen); in mbedtls_test_unhexify_alloc()
/mbedtls-3.7.0/programs/ssl/
Dssl_server2.c805 if ((new = mbedtls_calloc(1, sizeof(sni_entry))) == NULL) { in sni_parse()
819 if ((new->cert = mbedtls_calloc(1, sizeof(mbedtls_x509_crt))) == NULL || in sni_parse()
820 (new->key = mbedtls_calloc(1, sizeof(mbedtls_pk_context))) == NULL) { in sni_parse()
833 if ((new->ca = mbedtls_calloc(1, sizeof(mbedtls_x509_crt))) == NULL) { in sni_parse()
846 if ((new->crl = mbedtls_calloc(1, sizeof(mbedtls_x509_crl))) == NULL) { in sni_parse()
1001 if ((new = mbedtls_calloc(1, sizeof(psk_entry))) == NULL) { in psk_parse()
1201 ctx = mbedtls_calloc(1, sizeof(*ctx)); in ssl_async_start()
2334 buf = mbedtls_calloc(1, buf_content_size + 1); in main()
3785 larger_buf = mbedtls_calloc(1, ori_len + extra_len + 1); in main()
4015 if ((context_buf = mbedtls_calloc(1, buf_len)) == NULL) { in main()
[all …]

123