Home
last modified time | relevance | path

Searched refs:data_len (Results 1 – 25 of 51) sorted by relevance

123

/openssl/test/
H A Drc4test.c34 static unsigned char data_len[6] = { 8, 8, 8, 20, 28, 10 }; variable
71 RC4(&key, data_len[i], &(data[i][0]), obuf); in test_rc4_encrypt()
72 return TEST_mem_eq(obuf, data_len[i] + 1, output[i], data_len[i] + 1); in test_rc4_encrypt()
96 RC4(&key, data_len[3] - i, &(data[3][i]), &(obuf[i])); in test_rc4_multi_call()
97 return TEST_mem_eq(obuf, data_len[3] + 1, output[3], data_len[3] + 1); in test_rc4_multi_call()
128 ADD_ALL_TESTS(test_rc4_encrypt, OSSL_NELEM(data_len)); in setup_tests()
129 ADD_ALL_TESTS(test_rc4_end_processing, data_len[3]); in setup_tests()
130 ADD_ALL_TESTS(test_rc4_multi_call, data_len[3]); in setup_tests()
H A Dcmactest.c38 int data_len; member
148 || !TEST_false(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_bad()
152 || !TEST_false(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_bad()
156 || !TEST_true(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_bad()
183 size_t fill_len = test[case_idx].data_len - str_len; in test_cmac_run()
199 || !TEST_true(CMAC_Update(ctx, test[0].data, test[0].data_len)) in test_cmac_run()
209 || !TEST_true(CMAC_Update(ctx, test[1].data, test[1].data_len)) in test_cmac_run()
218 || !TEST_true(CMAC_Update(ctx, test[2].data, test[2].data_len)) in test_cmac_run()
226 || !TEST_true(CMAC_Update(ctx, test[2].data, test[2].data_len)) in test_cmac_run()
236 || !TEST_true(CMAC_Update(ctx, test[2].data, test[2].data_len)) in test_cmac_run()
[all …]
H A Dbio_dgram_test.c238 tx_msg[0].data_len = 5; in test_bio_dgram_impl()
244 tx_msg[1].data_len = 6; in test_bio_dgram_impl()
477 while (data_len > 0) { in random_data()
478 outl = data_len > sizeof(zeroes) ? (int)sizeof(zeroes) : (int)data_len; in random_data()
483 data_len -= outl; in random_data()
606 msgs[0].data_len = 19; in test_bio_dgram_pair()
608 msgs[1].data_len = 46; in test_bio_dgram_pair()
616 rmsgs[0].data_len = 64; in test_bio_dgram_pair()
618 rmsgs[1].data_len = 64; in test_bio_dgram_pair()
688 rmsgs[0].data_len = 64; in test_bio_dgram_pair()
[all …]
H A Dhmactest.c39 int data_len; member
92 ebcdic2ascii(test[0].data, test[0].data, test[0].data_len); in test_hmac_md5()
93 ebcdic2ascii(test[1].data, test[1].data, test[1].data_len); in test_hmac_md5()
95 ebcdic2ascii(test[2].data, test[2].data, test[2].data_len); in test_hmac_md5()
100 test[idx].data, test[idx].data_len, NULL, NULL), in test_hmac_md5()
116 || !TEST_false(HMAC_Update(ctx, test[4].data, test[4].data_len)) in test_hmac_bad()
147 || !TEST_true(HMAC_Update(ctx, test[4].data, test[4].data_len)) in test_hmac_run()
160 || !TEST_true(HMAC_Update(ctx, test[5].data, test[5].data_len)) in test_hmac_run()
169 || !TEST_true(HMAC_Update(ctx, test[6].data, test[6].data_len)) in test_hmac_run()
178 || !TEST_true(HMAC_Update(ctx, test[6].data, test[6].data_len)) in test_hmac_run()
[all …]
H A Dbio_core_test.c19 static int tst_bio_core_read_ex(OSSL_CORE_BIO *bio, char *data, size_t data_len, in tst_bio_core_read_ex() argument
22 return BIO_read_ex(bio->bio, data, data_len, bytes_read); in tst_bio_core_read_ex()
26 size_t data_len, size_t *written) in tst_bio_core_write_ex() argument
28 return BIO_write_ex(bio->bio, data, data_len, written); in tst_bio_core_write_ex()
H A Dendecode_test.c517 test_output_memory(label, data, data_len); in dump_der()
522 test_output_string(label, data, data_len - 1); in dump_pem()
531 d2i_PKCS8_PRIV_KEY_INFO(NULL, &datap, data_len); in check_unprotected_PKCS8_DER()
605 pkey = d2i_KeyParams(itype, NULL, &datap, data_len); in check_params_DER()
615 const void *data, size_t data_len) in check_params_PEM() argument
676 EVP_PKEY *pkey = b2i_PrivateKey(&datap, data_len); in check_MSBLOB()
699 int ok = ossl_do_PVK_header(&in, data_len, 0, &saltlen, &keylen); in check_PVK()
720 const void *data, size_t data_len) in check_protected_PKCS8_DER() argument
723 X509_SIG *p8 = d2i_X509_SIG(NULL, &datap, data_len); in check_protected_PKCS8_DER()
858 const void *data, size_t data_len) in check_public_MSBLOB() argument
[all …]
/openssl/test/helpers/
H A Dpktsplitbio.c54 size_t i, j, data_len = 0, msg_cnt = 0; in pkt_split_dgram_recvmmsg() local
69 data_len = msg[i].data_len; in pkt_split_dgram_recvmmsg()
70 else if (!TEST_size_t_eq(msg[i].data_len, data_len)) in pkt_split_dgram_recvmmsg()
87 if (!PACKET_buf_init(&pkt, thismsg->data, thismsg->data_len)) in pkt_split_dgram_recvmmsg()
103 thismsg->data_len -= remain; in pkt_split_dgram_recvmmsg()
104 msg[i + 1].data_len = remain; in pkt_split_dgram_recvmmsg()
106 (unsigned char *)msg[i + 1].data + thismsg->data_len, in pkt_split_dgram_recvmmsg()
H A Dnoisydgrambio.c138 size_t pktsize = msg[i].data_len; in bandwidth_limit()
307 size_t i, j, data_len = 0, msg_cnt = 0; in noisy_dgram_recvmmsg() local
328 data_len = msg[i].data_len; in noisy_dgram_recvmmsg()
329 if (!TEST_size_t_le(data_len, MSG_DATA_LEN_MAX)) in noisy_dgram_recvmmsg()
331 } else if (!TEST_size_t_eq(msg[i].data_len, data_len)) { in noisy_dgram_recvmmsg()
343 BIO_dump_fp(stdout, msg[i].data, msg[i].data_len); in noisy_dgram_recvmmsg()
384 BIO_dump_fp(stdout, thismsg->data, thismsg->data_len); in noisy_dgram_recvmmsg()
411 flip_bits(thismsg->data, thismsg->data_len, flip, flip_offset); in noisy_dgram_recvmmsg()
432 BIO_dump_fp(stdout, thismsg->data, thismsg->data_len); in noisy_dgram_recvmmsg()
440 BIO_dump_fp(stdout, thismsg->data, thismsg->data_len); in noisy_dgram_recvmmsg()
[all …]
H A Dquictestlib.c1100 tmpdata = OPENSSL_malloc(fault->msg.data_len + GROWTH_ALLOWANCE); in pcipher_sendmmsg()
1103 memcpy(tmpdata, fault->msg.data, fault->msg.data_len); in pcipher_sendmmsg()
1105 fault->msgalloc = fault->msg.data_len + GROWTH_ALLOWANCE; in pcipher_sendmmsg()
1108 if (!PACKET_buf_init(&pkt, fault->msg.data, fault->msg.data_len)) in pcipher_sendmmsg()
1223 if (newlen > fault->msg.data_len) in qtest_fault_resize_datagram()
1224 memset((unsigned char *)fault->msg.data + fault->msg.data_len, 0, in qtest_fault_resize_datagram()
1225 newlen - fault->msg.data_len); in qtest_fault_resize_datagram()
1227 fault->msg.data_len = newlen; in qtest_fault_resize_datagram()
1262 memcpy(dst->data, src->data, src->data_len); in bio_msg_copy()
1263 dst->data_len = src->data_len; in bio_msg_copy()
/openssl/ssl/quic/
H A Dquic_record_tx.c28 size_t data_len, alloc_len; member
230 txe->data_len = 0; in qtx_alloc_txe()
483 txe->data_len += l; in qtx_write_hdr()
570 txe->data_len += src_len; in qtx_encrypt_into_txe()
585 txe->data_len += el->tag_len; in qtx_encrypt_into_txe()
626 orig_data_len = txe->data_len; in qtx_write()
704 txe->data_len += src_len; in qtx_write()
724 txe->data_len = orig_data_len; in qtx_write()
742 txe->data_len = 0; in qtx_ensure_cons()
905 if (txe->data_len == 0) in ossl_qtx_finish_dgram()
[all …]
H A Dquic_demux.c168 e->data_len = 0; in demux_alloc_urxe()
274 msg[i].data_len = urxe->alloc_len; in demux_recv()
303 urxe->data_len = msg[i].data_len; in demux_recv()
322 e->data_len, in demux_identify_conn_id()
428 urxe->data_len = buf_len; in ossl_quic_demux_inject()
H A Dquic_rstream.c59 const unsigned char *data, uint64_t data_len, in ossl_quic_rstream_queue_data() argument
64 if ((data == NULL && data_len != 0) || (data_len == 0 && fin == 0)) { in ossl_quic_rstream_queue_data()
71 range.end = offset + data_len; in ossl_quic_rstream_queue_data()
H A Dquic_record_rx.c47 size_t data_len, alloc_len, refcount; member
252 urxe->data_len, qrx->msg_callback_ssl, in ossl_qrx_inject_urxe()
342 rxe->data_len = 0; in qrx_alloc_rxe()
868 rxe->data_len = rxe->hdr.len; in qrx_process_pkt()
1046 rxe->data_len = dec_len; in qrx_process_pkt()
1114 size_t data_len) in qrx_process_datagram() argument
1121 qrx->bytes_received += data_len; in qrx_process_datagram()
1123 if (!PACKET_buf_init(&pkt, data, data_len)) in qrx_process_datagram()
1149 if (qrx_process_pkt(qrx, e, &pkt, pkt_idx, &first_dcid, data_len)) in qrx_process_datagram()
1173 e->data_len); in qrx_process_one_urxe()
H A Dquic_port.c473 if (e->data_len < QUIC_STATELESS_RESET_TOKEN_LEN + 5 in port_try_handle_stateless_reset()
479 (QUIC_STATELESS_RESET_TOKEN *)(data + e->data_len in port_try_handle_stateless_reset()
534 if (e->data_len < QUIC_MIN_INITIAL_DGRAM_LEN) in port_default_packet_handler()
537 if (!PACKET_buf_init(&pkt, ossl_quic_urxe_data(e), e->data_len)) in port_default_packet_handler()
/openssl/providers/common/
H A Dbio_prov.c90 int ossl_prov_bio_read_ex(OSSL_CORE_BIO *bio, void *data, size_t data_len, in ossl_prov_bio_read_ex() argument
95 return c_bio_read_ex(bio, data, data_len, bytes_read); in ossl_prov_bio_read_ex()
98 int ossl_prov_bio_write_ex(OSSL_CORE_BIO *bio, const void *data, size_t data_len, in ossl_prov_bio_write_ex() argument
103 return c_bio_write_ex(bio, data, data_len, written); in ossl_prov_bio_write_ex()
164 static int bio_core_read_ex(BIO *bio, char *data, size_t data_len, in bio_core_read_ex() argument
167 return ossl_prov_bio_read_ex(BIO_get_data(bio), data, data_len, bytes_read); in bio_core_read_ex()
170 static int bio_core_write_ex(BIO *bio, const char *data, size_t data_len, in bio_core_write_ex() argument
173 return ossl_prov_bio_write_ex(BIO_get_data(bio), data, data_len, written); in bio_core_write_ex()
/openssl/apps/
H A Dtsget.in22 my $data_len = length ${$state->{data}};
23 if ($state->{bytes} < $data_len) {
24 $data_len = $data_len - $state->{bytes};
25 $data_len = $maxlength if $data_len > $maxlength;
26 $return_data = substr ${$state->{data}}, $state->{bytes}, $data_len;
27 $state->{bytes} += $data_len;
/openssl/fuzz/
H A Dprovider.c286 int data_len = 0; in fuzz_params() local
350 data_len = 0; in fuzz_params()
353 p->data_size = data_len; in fuzz_params()
358 data_len = 0; in fuzz_params()
361 p->data_size = data_len; in fuzz_params()
365 if (*use_param && (data_len = read_utf8_ptr(buf, len, &p_value_utf8_ptr)) < 0) in fuzz_params()
366 data_len = 0; in fuzz_params()
369 p->data_size = data_len; in fuzz_params()
373 if (*use_param && (data_len = read_octet_ptr(buf, len, &p_value_octet_ptr)) < 0) in fuzz_params()
374 data_len = 0; in fuzz_params()
[all …]
/openssl/crypto/err/
H A Derr_prn.c75 size_t available_len, data_len; in ERR_add_error_txt() local
86 data_len = strlen(data); in ERR_add_error_txt()
89 if (data_len >= MAX_DATA_LEN in ERR_add_error_txt()
90 || strlen(separator) >= (size_t)(MAX_DATA_LEN - data_len)) in ERR_add_error_txt()
93 available_len = MAX_DATA_LEN - data_len - strlen(separator) - 1; in ERR_add_error_txt()
/openssl/crypto/bio/
H A Dbss_core.c40 static int bio_core_read_ex(BIO *bio, char *data, size_t data_len, in bio_core_read_ex() argument
47 return bcgbl->c_bio_read_ex(BIO_get_data(bio), data, data_len, bytes_read); in bio_core_read_ex()
50 static int bio_core_write_ex(BIO *bio, const char *data, size_t data_len, in bio_core_write_ex() argument
57 return bcgbl->c_bio_write_ex(BIO_get_data(bio), data, data_len, written); in bio_core_write_ex()
/openssl/demos/signature/
H A DEVP_EC_Signature_demo.c50 size_t data_len; in get_key() local
55 data_len = sizeof(pub_key_der); in get_key()
59 data_len = sizeof(priv_key_der); in get_key()
63 (void)OSSL_DECODER_from_data(dctx, &data, &data_len); in get_key()
/openssl/demos/encrypt/
H A Drsa_encrypt.c42 size_t data_len; in get_key() local
47 data_len = sizeof(pub_key_der); in get_key()
51 data_len = sizeof(priv_key_der); in get_key()
55 (void)OSSL_DECODER_from_data(dctx, &data, &data_len); in get_key()
/openssl/providers/common/include/prov/
H A Dbio.h19 int ossl_prov_bio_read_ex(OSSL_CORE_BIO *bio, void *data, size_t data_len,
21 int ossl_prov_bio_write_ex(OSSL_CORE_BIO *bio, const void *data, size_t data_len,
/openssl/crypto/
H A Dparam_build_set.c58 size_t data_len) in ossl_param_build_set_octet_string() argument
61 return OSSL_PARAM_BLD_push_octet_string(bld, key, data, data_len); in ossl_param_build_set_octet_string()
65 return OSSL_PARAM_set_octet_string(p, data, data_len); in ossl_param_build_set_octet_string()
/openssl/include/internal/
H A Dquic_demux.h100 size_t data_len, alloc_len; member
151 return ossl_quic_urxe_data(e) + e->data_len; in ossl_quic_urxe_data_end()
/openssl/providers/implementations/kdfs/
H A Dhkdf.c95 size_t data_len; member
138 OPENSSL_clear_free(ctx->data, ctx->data_len); in kdf_hkdf_reset()
160 || !ossl_prov_memdup(src->data, src->data_len, in kdf_hkdf_dup()
161 &dest->data, &dest->data_len) in kdf_hkdf_dup()
834 ctx->data, ctx->data_len, in kdf_tls1_3_derive()
878 OPENSSL_clear_free(ctx->data, ctx->data_len); in kdf_tls1_3_set_ctx_params()
882 &ctx->data_len)) in kdf_tls1_3_set_ctx_params()

Completed in 43 milliseconds

123