Home
last modified time | relevance | path

Searched refs:ptlen (Results 1 – 14 of 14) sorted by relevance

/freebsd/crypto/openssl/util/
H A Dcavs-to-evptest.pl24 my $ptlen = 0;
52 $ptlen = $2;
83 $ptlen = $2;
103 if ($ptlen > 0) {
/freebsd/libexec/phttpget/
H A Dphttpget.c76 size_t ptlen, ctlen; in b64enc() local
84 ptlen = strlen(ptext); in b64enc()
85 if (ptlen > ((SIZE_MAX - 1) / 4) * 3 - 2) in b64enc()
87 ctlen = 4 * ((ptlen + 2) / 3) + 1; in b64enc()
96 for (pt = ptext, pc = ctext; ptlen; ptlen -= 3, pc += 4) { in b64enc()
100 if (j < ptlen) in b64enc()
106 if (j <= ptlen + 1) in b64enc()
114 if (ptlen <= 3) in b64enc()
/freebsd/crypto/openssl/test/
H A Dtls13encryptiontest.c220 size_t ptlen; in load_record() local
225 pt = multihexstr2buf(recd->plaintext, &ptlen); in load_record()
230 rec->data = rec->input = OPENSSL_malloc(ptlen + EVP_GCM_TLS_TAG_LEN); in load_record()
235 rec->length = ptlen; in load_record()
236 memcpy(rec->data, pt, ptlen); in load_record()
H A Daesgcmtest.c76 int outlen, ptlen; in do_decrypt() local
89 && TEST_true(EVP_DecryptUpdate(ctx, pt, &ptlen, ct, in do_decrypt()
96 && TEST_mem_eq(gcm_pt, sizeof(gcm_pt), pt, ptlen); in do_decrypt()
H A Devp_fetch_prov_test.c265 int ret = 0, ctlen, ptlen; in encrypt_decrypt() local
276 || !TEST_true(EVP_CipherUpdate(ctx, pt, &ptlen, ct, ctlen)) in encrypt_decrypt()
277 || !TEST_true(EVP_CipherFinal_ex(ctx, pt, &ptlen)) in encrypt_decrypt()
278 || !TEST_mem_eq(pt, ptlen, msg, len)) in encrypt_decrypt()
H A Dthreadstest.c930 size_t ptlen, ctlen = sizeof(ctbuf); in thread_shared_evp_pkey() local
956 ptlen = sizeof(ptbuf); in thread_shared_evp_pkey()
958 || !TEST_int_gt(EVP_PKEY_decrypt(ctx, ptbuf, &ptlen, ctbuf, ctlen), in thread_shared_evp_pkey()
960 || !TEST_mem_eq(msg, strlen(msg), ptbuf, ptlen)) in thread_shared_evp_pkey()
H A Dhpke_test.c52 size_t ptlen; member
163 aead[i].pt, aead[i].ptlen))) in do_testhpke()
203 if (!TEST_mem_eq(aead[i].pt, aead[i].ptlen, ptout, ptoutlen)) in do_testhpke()
H A Devp_extra_test.c4076 int ctlen, ptlen, tmp = 99; in test_decrypt_null_chunks() local
4101 || !TEST_true(EVP_DecryptUpdate(ctx, plaintext, &ptlen, ciphertext, in test_decrypt_null_chunks()
4107 || !TEST_true(EVP_DecryptUpdate(ctx, plaintext + ptlen, &tmp, NULL, in test_decrypt_null_chunks()
4110 || !TEST_true(EVP_DecryptUpdate(ctx, plaintext + ptlen, &tmp, in test_decrypt_null_chunks()
4113 || !TEST_int_eq(ptlen += tmp, sizeof(msg)) in test_decrypt_null_chunks()
4114 || !TEST_true(EVP_DecryptFinal(ctx, plaintext + ptlen, &tmp)) in test_decrypt_null_chunks()
4116 || !TEST_mem_eq(msg, sizeof(msg), plaintext, ptlen)) in test_decrypt_null_chunks()
/freebsd/crypto/openssl/crypto/hpke/
H A Dhpke.c144 unsigned char *pt, size_t *ptlen) in hpke_aead_dec() argument
152 if (ctlen <= taglen || *ptlen < ctlen - taglen) { in hpke_aead_dec()
186 *ptlen = len; in hpke_aead_dec()
201 OPENSSL_cleanse(pt, *ptlen); in hpke_aead_dec()
220 const unsigned char *pt, size_t ptlen, in hpke_aead_enc() argument
230 if (*ctlen <= taglen || ptlen > *ctlen - taglen) { in hpke_aead_enc()
264 if (EVP_EncryptUpdate(ctx, ct, &len, pt, ptlen) != 1) { in hpke_aead_enc()
1166 const unsigned char *pt, size_t ptlen) in OSSL_HPKE_seal() argument
1172 || pt == NULL || ptlen == 0) { in OSSL_HPKE_seal()
1194 if (hpke_aead_enc(ctx, seqbuf, aad, aadlen, pt, ptlen, ct, ctlen) != 1) { in OSSL_HPKE_seal()
[all …]
/freebsd/crypto/openssl/include/openssl/
H A Dhpke.h119 const unsigned char *pt, size_t ptlen);
130 unsigned char *pt, size_t *ptlen,
H A Devp.h1496 #define EVP_PKEY_set1_tls_encodedpoint(pkey, pt, ptlen) \ argument
1497 EVP_PKEY_set1_encoded_public_key((pkey), (pt), (ptlen))
/freebsd/contrib/tcpdump/
H A Dprint-esp.c181 unsigned int ptlen; in do_decrypt() local
230 ptlen = ctlen; in do_decrypt()
231 pt = (u_char *)calloc(1, ptlen); in do_decrypt()
/freebsd/crypto/openssl/doc/man3/
H A DOSSL_HPKE_CTX_new.pod38 const unsigned char *pt, size_t ptlen);
49 unsigned char *pt, size_t *ptlen,
269 buffer I<pt> of size I<ptlen> and optional additional authenticated data buffer
321 size I<aadlen>, to produce the plaintext I<pt> of size I<ptlen>.
322 On input I<ptlen> should contain the maximum size of the I<pt> buffer, and
326 An error will occur if the input I<ptlen> is too small.
505 size_t ptlen = strlen((char *)pt);
526 if (OSSL_HPKE_seal(sctx, ct, &ctlen, aad, aadlen, pt, ptlen) != 1)
H A DEVP_PKEY_set1_encoded_public_key.pod23 const unsigned char *pt, size_t ptlen);