Home
last modified time | relevance | path

Searched refs:mbedtls_calloc (Results 1 - 25 of 63) sorted by relevance

123

/third_party/mbedtls/programs/test/
H A 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()
/third_party/mbedtls/library/
H A Dmemory_buffer_alloc.c666 p = mbedtls_calloc(1, 1); in mbedtls_memory_buffer_alloc_self_test()
667 q = mbedtls_calloc(1, 128); in mbedtls_memory_buffer_alloc_self_test()
668 r = mbedtls_calloc(1, 16); in mbedtls_memory_buffer_alloc_self_test()
697 p = mbedtls_calloc(1, 1); in mbedtls_memory_buffer_alloc_self_test()
698 q = mbedtls_calloc(1, 128); in mbedtls_memory_buffer_alloc_self_test()
699 r = mbedtls_calloc(1, 16); in mbedtls_memory_buffer_alloc_self_test()
723 p = mbedtls_calloc(1, sizeof(buf) - sizeof(memory_header)); in mbedtls_memory_buffer_alloc_self_test()
726 TEST_ASSERT(mbedtls_calloc(1, 1) == NULL); in mbedtls_memory_buffer_alloc_self_test()
730 p = mbedtls_calloc(1, sizeof(buf) - 2 * sizeof(memory_header) - 16); in mbedtls_memory_buffer_alloc_self_test()
731 q = mbedtls_calloc( in mbedtls_memory_buffer_alloc_self_test()
[all...]
H A 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()
H A 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( in chachapoly_ctx_alloc()
[all...]
H A 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()
H A 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()
H A 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()
H A 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()
H A 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()
H A 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()
H A 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()
H A 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()
H A 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()
H A Dmd.c411 ctx->md_ctx = mbedtls_calloc(1, sizeof(mbedtls_##type##_context)); \
441 ctx->md_ctx = mbedtls_calloc(1, sizeof(psa_hash_operation_t)); in mbedtls_md_setup()
498 ctx->hmac_ctx = mbedtls_calloc(2, md_info->block_size); in mbedtls_md_setup()
H A Dx509write.c91 buf = mbedtls_calloc(1, buflen); in mbedtls_x509_write_set_san_common()
H A 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()
H A 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( in mbedtls_ssl_setup()
[all...]
H A Dpkwrite.c548 output_buf = mbedtls_calloc(1, PUB_DER_MAX_BYTES); in mbedtls_pk_write_pubkey_pem()
575 output_buf = mbedtls_calloc(1, PRV_DER_MAX_BYTES); in mbedtls_pk_write_key_pem()
/third_party/mbedtls/include/mbedtls/
H A Dplatform.h142 #undef mbedtls_calloc macro
144 #define mbedtls_calloc MBEDTLS_PLATFORM_CALLOC_MACRO macro
148 extern void *mbedtls_calloc(size_t n, size_t size);
165 #undef mbedtls_calloc macro
167 #define mbedtls_calloc calloc macro
/third_party/mbedtls/tests/include/test/
H A Dmacros.h128 (pointer) = mbedtls_calloc((item_count), \
151 * Note: if passing size 0, mbedtls_calloc may return NULL. In this case,
158 (pointer) = mbedtls_calloc((item_count), \
161 (pointer) = mbedtls_calloc(1, 1); \
178 (pointer) = mbedtls_calloc((item_count), \
/third_party/mbedtls/tests/src/test_helpers/
H A 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()
1294 * a non-NULL pointers from `mbedtls_calloc` even if in mbedtls_test_ssl_build_transforms()
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( in mbedtls_test_ssl_tls12_populate_session()
[all...]
/third_party/mbedtls/tests/src/
H A Dbignum_helpers.c48 *pX = mbedtls_calloc(*plimbs, sizeof(**pX)); in mbedtls_test_read_mpi_core()
H A Dhelpers.c618 p = mbedtls_calloc(1, actual_len); in mbedtls_test_zero_alloc()
637 obuf = mbedtls_calloc(1, *olen); in mbedtls_test_unhexify_alloc()
/third_party/mbedtls/programs/ssl/
H A 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( in main()
[all...]
/third_party/mbedtls/programs/util/
H A Dpem2der.c136 (*buf = mbedtls_calloc(1, *n + 1)) == NULL) { in load_file()

Completed in 33 milliseconds

123