Home
last modified time | relevance | path

Searched refs:ctlen (Results 1 – 10 of 10) sorted by relevance

/third_party/openssl/test/
Daesgcmtest.c97 int ctlen = 0, taglen = 0; in kat_test() local
99 return do_encrypt(NULL, ct, &ctlen, tag, &taglen) in kat_test()
100 && TEST_mem_eq(gcm_ct, sizeof(gcm_ct), ct, ctlen) in kat_test()
102 && do_decrypt(gcm_iv, ct, ctlen, tag, taglen); in kat_test()
124 int ctlen = 0, taglen = 0; in ivgen_test() local
126 return do_encrypt(iv_gen, ct, &ctlen, tag, &taglen) in ivgen_test()
127 && do_decrypt(iv_gen, ct, ctlen, tag, taglen); in ivgen_test()
Devp_libctx_test.c531 size_t ctlen = 0, unwraplen = 0, secretlen = 0; in kem_rsa_gen_recover() local
539 && TEST_int_eq(EVP_PKEY_encapsulate(dctx, NULL, &ctlen, NULL, in kem_rsa_gen_recover()
541 && TEST_int_eq(ctlen, secretlen) in kem_rsa_gen_recover()
542 && TEST_int_eq(ctlen, bits / 8) in kem_rsa_gen_recover()
543 && TEST_int_eq(EVP_PKEY_encapsulate(dctx, ct, &ctlen, secret, in kem_rsa_gen_recover()
549 ct, ctlen), 1) in kem_rsa_gen_recover()
551 ct, ctlen), 1) in kem_rsa_gen_recover()
596 size_t ctlen = 0, secretlen = 0; in kem_rsa_params() local
619 && TEST_int_eq(EVP_PKEY_encapsulate(pubctx, ct, &ctlen, secret, &secretlen), -2) in kem_rsa_params()
627 && TEST_int_eq(EVP_PKEY_encapsulate(pubctx, ct, &ctlen, secret, NULL), 1) in kem_rsa_params()
[all …]
Dtls-provider.c329 unsigned char *ct, size_t *ctlen, in xor_encapsulate() argument
348 if (ctlen == NULL && sslen == NULL) in xor_encapsulate()
350 if (ctlen != NULL) in xor_encapsulate()
351 *ctlen = XOR_KEY_SIZE; in xor_encapsulate()
367 *ctlen = XOR_KEY_SIZE; in xor_encapsulate()
388 const unsigned char *ct, size_t ctlen) in xor_decapsulate() argument
409 if (ctlen != XOR_KEY_SIZE) in xor_decapsulate()
Devp_fetch_prov_test.c244 int ret = 0, ctlen, ptlen; in encrypt_decrypt() local
252 || !TEST_true(EVP_CipherUpdate(ctx, ct, &ctlen, msg, len)) in encrypt_decrypt()
253 || !TEST_true(EVP_CipherFinal_ex(ctx, ct, &ctlen)) in encrypt_decrypt()
255 || !TEST_true(EVP_CipherUpdate(ctx, pt, &ptlen, ct, ctlen)) in encrypt_decrypt()
Dthreadstest.c393 size_t ptlen, ctlen = sizeof(ctbuf); in thread_shared_evp_pkey() local
408 || !TEST_int_ge(EVP_PKEY_encrypt(ctx, ctbuf, &ctlen, in thread_shared_evp_pkey()
421 || !TEST_int_gt(EVP_PKEY_decrypt(ctx, ptbuf, &ptlen, ctbuf, ctlen), in thread_shared_evp_pkey()
Devp_extra_test.c2827 int ctlen, ptlen, tmp = 99; in test_decrypt_null_chunks() local
2835 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext, &ctlen, msg, in test_decrypt_null_chunks()
2838 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext + ctlen, &tmp, NULL, in test_decrypt_null_chunks()
2841 || !TEST_true(EVP_EncryptUpdate(ctx, ciphertext + ctlen, &tmp, in test_decrypt_null_chunks()
2844 || !TEST_int_eq(ctlen += tmp, sizeof(msg)) in test_decrypt_null_chunks()
2845 || !TEST_true(EVP_EncryptFinal(ctx, ciphertext + ctlen, &tmp)) in test_decrypt_null_chunks()
2863 ctlen - dec_offset)) in test_decrypt_null_chunks()
/third_party/openssl/ssl/
Ds3_lib.c4842 const unsigned char *ct, size_t ctlen, in ssl_decapsulate() argument
4858 || EVP_PKEY_decapsulate(pctx, NULL, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
4869 if (EVP_PKEY_decapsulate(pctx, pms, &pmslen, ct, ctlen) <= 0) { in ssl_decapsulate()
4897 size_t pmslen = 0, ctlen = 0; in ssl_encapsulate() local
4908 || EVP_PKEY_encapsulate(pctx, NULL, &ctlen, NULL, &pmslen) <= 0 in ssl_encapsulate()
4909 || pmslen == 0 || ctlen == 0) { in ssl_encapsulate()
4915 ct = OPENSSL_malloc(ctlen); in ssl_encapsulate()
4921 if (EVP_PKEY_encapsulate(pctx, ct, &ctlen, pms, &pmslen) <= 0) { in ssl_encapsulate()
4940 *ctlenp = ctlen; in ssl_encapsulate()
Dssl_local.h2467 const unsigned char *ct, size_t ctlen,
/third_party/openssl/ssl/statem/
Dextensions_srvr.c1677 size_t ctlen = 0; in tls_construct_stoc_key_share() local
1685 if (ssl_encapsulate(s, ckey, &ct, &ctlen, 0) == 0) { in tls_construct_stoc_key_share()
1690 if (ctlen == 0) { in tls_construct_stoc_key_share()
1696 if (!WPACKET_sub_memcpy_u16(pkt, ct, ctlen) in tls_construct_stoc_key_share()
Dextensions_clnt.c1862 size_t ctlen = PACKET_remaining(&encoded_pt); in tls_parse_stoc_key_share() local
1864 if (ssl_decapsulate(s, ckey, ct, ctlen, 1) == 0) { in tls_parse_stoc_key_share()