Home
last modified time | relevance | path

Searched refs:outlen (Results 1 – 25 of 115) sorted by relevance

12345

/openssl-master/crypto/asn1/
A Da_strex.c149 outlen = 0; in do_buf()
229 return outlen; in do_buf()
293 if (outlen < 0) in do_dump()
334 int outlen, len; in do_print_ex() local
344 outlen = 0; in do_print_ex()
352 outlen++; in do_print_ex()
396 outlen += len; in do_print_ex()
398 outlen += 2; in do_print_ex()
407 return outlen; in do_print_ex()
434 int outlen, len; in do_name_ex() local
[all …]
A Da_mbstr.c49 int outform, outlen = 0; in ASN1_mbstring_ncopy() local
167 outlen = nchar; in ASN1_mbstring_ncopy()
172 outlen = nchar << 1; in ASN1_mbstring_ncopy()
177 outlen = nchar << 2; in ASN1_mbstring_ncopy()
182 outlen = 0; in ASN1_mbstring_ncopy()
187 if ((p = OPENSSL_malloc(outlen + 1)) == NULL) { in ASN1_mbstring_ncopy()
193 dest->length = outlen; in ASN1_mbstring_ncopy()
195 p[outlen] = 0; in ASN1_mbstring_ncopy()
260 int *outlen, len; in out_utf8() local
265 outlen = arg; in out_utf8()
[all …]
/openssl-master/demos/cipher/
A Daesccm.c76 int outlen, tmplen; in aes_ccm_encrypt() local
116 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_pt))) in aes_ccm_encrypt()
120 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_encrypt()
124 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt))) in aes_ccm_encrypt()
129 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt()
163 int outlen, rv; in aes_ccm_decrypt() local
200 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_ct))) in aes_ccm_decrypt()
204 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_decrypt()
208 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt()
213 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()
A Daesgcm.c75 int outlen, tmplen; in aes_gcm_encrypt() local
110 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, gcm_aad, sizeof(gcm_aad))) in aes_gcm_encrypt()
114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt()
119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt()
152 int outlen, rv; in aes_gcm_decrypt() local
182 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad, sizeof(gcm_aad))) in aes_gcm_decrypt()
186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt()
191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt()
201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
/openssl-master/providers/implementations/kem/
A Drsa_kem.c210 unsigned char *out, int outlen) in rsasve_gen_rand_bytes() argument
234 && (BN_bn2binpad(z, out, outlen) == outlen)); in rsasve_gen_rand_bytes()
245 unsigned char *out, size_t *outlen, in rsasve_generate() argument
259 if (outlen == NULL && secretlen == NULL) in rsasve_generate()
261 if (outlen != NULL) in rsasve_generate()
262 *outlen = nlen; in rsasve_generate()
278 if (outlen != NULL) in rsasve_generate()
279 *outlen = nlen; in rsasve_generate()
293 unsigned char *out, size_t *outlen, in rsasve_recover() argument
306 *outlen = nlen; in rsasve_recover()
[all …]
/openssl-master/crypto/pkcs12/
A Dp12_decr.c26 int outlen, i; in PKCS12_pbe_crypt_ex() local
82 outlen = i; in PKCS12_pbe_crypt_ex()
91 outlen += i; in PKCS12_pbe_crypt_ex()
96 (int)mac_len, out+outlen) < 0) { in PKCS12_pbe_crypt_ex()
100 outlen += mac_len; in PKCS12_pbe_crypt_ex()
104 *datalen = outlen; in PKCS12_pbe_crypt_ex()
136 int outlen = 0; in PKCS12_item_decrypt_d2i_ex() local
139 &out, &outlen, 0, libctx, propq)) in PKCS12_item_decrypt_d2i_ex()
144 BIO_dump(trc_out, out, outlen); in PKCS12_item_decrypt_d2i_ex()
147 ret = ASN1_item_d2i(NULL, &p, outlen, it); in PKCS12_item_decrypt_d2i_ex()
[all …]
/openssl-master/test/
A Dpkey_meth_kdf_test.c24 size_t outlen = sizeof(out); in test_kdf_tls1_prf() local
48 if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { in test_kdf_tls1_prf()
73 size_t outlen = sizeof(out); in test_kdf_hkdf() local
102 if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { in test_kdf_hkdf()
127 size_t outlen = sizeof(out); in test_kdf_scrypt() local
161 if (EVP_PKEY_derive(pctx, out, &outlen) > 0) { in test_kdf_scrypt()
169 if (EVP_PKEY_derive(pctx, out, &outlen) <= 0) { in test_kdf_scrypt()
A Dpbetest.c63 int i, outlen; in test_pkcs5_pbe() local
81 outlen = i; in test_pkcs5_pbe()
85 outlen += i; in test_pkcs5_pbe()
87 if (!TEST_mem_eq(out, outlen, exp, exp_len)) in test_pkcs5_pbe()
97 outlen = i; in test_pkcs5_pbe()
101 if (!TEST_mem_eq(out, outlen, pbe_plaintext, sizeof(pbe_plaintext))) in test_pkcs5_pbe()
A Daesgcmtest.c43 int outlen; in do_encrypt() local
52 && TEST_true(EVP_EncryptUpdate(ctx, NULL, &outlen, gcm_aad, in do_encrypt()
56 && TEST_true(EVP_EncryptFinal_ex(ctx, outbuf, &outlen) > 0) in do_encrypt()
71 int outlen, ptlen; in do_decrypt() local
80 && TEST_true(EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad, in do_decrypt()
86 && TEST_true(EVP_DecryptFinal_ex(ctx, outbuf, &outlen) > 0) in do_decrypt()
A Drecordlentest.c46 size_t outlen; in write_record() local
49 outlen = sizeof(buf); in write_record()
51 outlen = len; in write_record()
53 if (!BIO_write_ex(b, buf, outlen, &written) in write_record()
54 || written != outlen) in write_record()
57 len -= outlen; in write_record()
/openssl-master/crypto/ct/
A Dct_b64.c27 int outlen, i; in ct_base64_decode() local
35 outlen = (inlen / 4) * 3; in ct_base64_decode()
36 outbuf = OPENSSL_malloc(outlen); in ct_base64_decode()
42 outlen = EVP_DecodeBlock(outbuf, (unsigned char *)in, inlen); in ct_base64_decode()
43 if (outlen < 0) { in ct_base64_decode()
51 --outlen; in ct_base64_decode()
57 return outlen; in ct_base64_decode()
/openssl-master/providers/implementations/rands/
A Ddrbg_hash.c79 size_t outlen = drbg->seedlen; in hash_df() local
80 size_t num_bits_returned = outlen * 8; in hash_df()
110 if (outlen < hash->blocklen) { in hash_df()
113 memcpy(out, vtmp, outlen); in hash_df()
120 outlen -= hash->blocklen; in hash_df()
121 if (outlen == 0) in hash_df()
212 if (outlen == 0) in hash_gen()
221 if (outlen < hash->blocklen) { in hash_gen()
229 outlen -= hash->blocklen; in hash_gen()
230 if (outlen == 0) in hash_gen()
[all …]
A Ddrbg_ctr.c104 int i, outlen = AES_BLOCK_SIZE; in ctr_BCC_block() local
110 || outlen != len) in ctr_BCC_block()
205 int outlen = AES_BLOCK_SIZE; in ctr_df() local
240 || outlen != AES_BLOCK_SIZE) in ctr_df()
266 int outlen = AES_BLOCK_SIZE; in ctr_update() local
282 || outlen != len) in ctr_update()
402 if (outlen == 0) { in drbg_ctr_generate()
410 memset(out, 0, outlen); in drbg_ctr_generate()
424 buflen = outlen > (1U << 30) ? (1U << 30) : outlen; in drbg_ctr_generate()
444 outlen -= buflen; in drbg_ctr_generate()
[all …]
/openssl-master/test/testutil/
A Dfake_random.c70 static int fake_rand_generate(void *vrng, unsigned char *out, size_t outlen, in fake_rand_generate() argument
79 return (*frng->cb)(out, outlen, frng->name, frng->ctx); in fake_rand_generate()
80 while (outlen > 0) { in fake_rand_generate()
82 l = outlen < sizeof(r) ? outlen : sizeof(r); in fake_rand_generate()
86 outlen -= l; in fake_rand_generate()
215 int (*cb)(unsigned char *out, size_t outlen, in fake_rand_set_callback() argument
224 size_t outlen, in fake_rand_set_public_private_callbacks() argument
/openssl-master/doc/man3/
A DEVP_PKEY_decrypt.pod15 unsigned char *out, size_t *outlen,
30 buffer is written to the B<outlen> parameter. If B<out> is not B<NULL> then
31 before the call the B<outlen> parameter should contain the length of the
33 B<out> and the amount of data written to B<outlen>.
62 size_t outlen, inlen;
78 if (EVP_PKEY_decrypt(ctx, NULL, &outlen, in, inlen) <= 0)
81 out = OPENSSL_malloc(outlen);
86 if (EVP_PKEY_decrypt(ctx, out, &outlen, in, inlen) <= 0)
89 /* Decrypted data is outlen bytes written to buffer out */
A DEVP_PKEY_encrypt.pod15 unsigned char *out, size_t *outlen,
30 buffer is written to the B<outlen> parameter. If B<out> is not B<NULL> then
31 before the call the B<outlen> parameter should contain the length of the
33 B<out> and the amount of data written to B<outlen>.
65 size_t outlen, inlen;
81 if (EVP_PKEY_encrypt(ctx, NULL, &outlen, in, inlen) <= 0)
84 out = OPENSSL_malloc(outlen);
89 if (EVP_PKEY_encrypt(ctx, out, &outlen, in, inlen) <= 0)
92 /* Encrypted data is outlen bytes written to buffer out */
A DEVP_PKEY_encapsulate.pod14 unsigned char *out, size_t *outlen,
26 I<*outlen> parameter and the maximum size of the generated key buffer is written
30 I<out> and its size is written to I<*outlen>.
54 size_t secretlen = 0, outlen = 0;
67 if (EVP_PKEY_encapsulate(ctx, NULL, &outlen, NULL, &secretlen) <= 0)
70 out = OPENSSL_malloc(outlen);
80 if (EVP_PKEY_encapsulate(ctx, out, &outlen, secret, &secretlen) <= 0)
A DSSL_get_client_random.pod15 size_t SSL_get_client_random(const SSL *ssl, unsigned char *out, size_t outlen);
16 size_t SSL_get_server_random(const SSL *ssl, unsigned char *out, size_t outlen);
18 unsigned char *out, size_t outlen);
27 which must have at least B<outlen> bytes available. It returns the
28 total number of bytes that were actually copied. If B<outlen> is
69 other outlen arguments to the SSL_get_*_random() functions is provided
82 For the other functions, if B<outlen> is greater than 0 then these functions
84 B<outlen>. If B<outlen> is 0 then these functions return the maximum number
/openssl-master/crypto/ec/
A Decdh_kdf.c24 int ossl_ecdh_kdf_X9_63(unsigned char *out, size_t outlen, in ossl_ecdh_kdf_X9_63() argument
45 ret = EVP_KDF_derive(kctx, out, outlen, params) > 0; in ossl_ecdh_kdf_X9_63()
57 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, in ECDH_KDF_X9_62() argument
62 return ossl_ecdh_kdf_X9_63(out, outlen, Z, Zlen, sinfo, sinfolen, md, NULL, in ECDH_KDF_X9_62()
A Dec_kmeth.c154 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, in ECDH_compute_key() argument
157 size_t *outlen)) in ECDH_compute_key() argument
165 if (outlen > INT_MAX) { in ECDH_compute_key()
172 KDF(sec, seclen, out, &outlen); in ECDH_compute_key()
174 if (outlen > seclen) in ECDH_compute_key()
175 outlen = seclen; in ECDH_compute_key()
176 memcpy(out, sec, outlen); in ECDH_compute_key()
179 return outlen; in ECDH_compute_key()
/openssl-master/crypto/dh/
A Ddh_kdf.c28 int ossl_dh_kdf_X9_42_asn1(unsigned char *out, size_t outlen, in ossl_dh_kdf_X9_42_asn1() argument
56 ret = EVP_KDF_derive(kctx, out, outlen, params) > 0; in ossl_dh_kdf_X9_42_asn1()
64 int DH_KDF_X9_42(unsigned char *out, size_t outlen, in DH_KDF_X9_42() argument
76 return ossl_dh_kdf_X9_42_asn1(out, outlen, Z, Zlen, key_alg, in DH_KDF_X9_42()
/openssl-master/crypto/pem/
A Dpvkfmt.c574 outlen = 16 in do_i2b()
608 return outlen; in do_i2b()
614 int outlen, wrlen; in do_i2b_bio() local
617 if (outlen < 0) in do_i2b_bio()
622 return outlen; in do_i2b_bio()
1023 outlen += pklen; in i2b_PVK()
1025 return outlen; in i2b_PVK()
1096 ret = outlen; in i2b_PVK()
1113 int outlen, wrlen; in i2b_PVK_bio_ex() local
1116 if (outlen < 0) in i2b_PVK_bio_ex()
[all …]
/openssl-master/providers/implementations/asymciphers/
A Dsm2_enc.c81 static int sm2_asym_encrypt(void *vpsm2ctx, unsigned char *out, size_t *outlen, in sm2_asym_encrypt() argument
92 if (!ossl_sm2_ciphertext_size(psm2ctx->key, md, inlen, outlen)) { in sm2_asym_encrypt()
99 return ossl_sm2_encrypt(psm2ctx->key, md, in, inlen, out, outlen); in sm2_asym_encrypt()
102 static int sm2_asym_decrypt(void *vpsm2ctx, unsigned char *out, size_t *outlen, in sm2_asym_decrypt() argument
113 if (!ossl_sm2_plaintext_size(in, inlen, outlen)) in sm2_asym_decrypt()
118 return ossl_sm2_decrypt(psm2ctx->key, md, in, inlen, out, outlen); in sm2_asym_decrypt()
/openssl-master/crypto/rsa/
A Drsa_oaep.c335 long i, outlen = 0; in PKCS1_MGF1() local
348 for (i = 0; outlen < len; i++) { in PKCS1_MGF1()
359 if (outlen + mdlen <= len) { in PKCS1_MGF1()
360 if (!EVP_DigestFinal_ex(c, mask + outlen, NULL)) in PKCS1_MGF1()
362 outlen += mdlen; in PKCS1_MGF1()
366 memcpy(mask + outlen, md, len - outlen); in PKCS1_MGF1()
367 outlen = len; in PKCS1_MGF1()
/openssl-master/providers/implementations/exchange/
A Decdh_exch.c296 size_t outlen; in ecdh_set_ctx_params() local
298 if (!OSSL_PARAM_get_size_t(p, &outlen)) in ecdh_set_ctx_params()
300 pectx->kdf_outlen = outlen; in ecdh_set_ctx_params()
430 size_t *psecretlen, size_t outlen) in ecdh_plain_derive() argument
460 size = outlen < ecdhsize ? outlen : ecdhsize; in ecdh_plain_derive()
508 size_t *psecretlen, size_t outlen) in ecdh_X9_63_kdf_derive() argument
520 if (pecdhctx->kdf_outlen > outlen) { in ecdh_X9_63_kdf_derive()
551 size_t *psecretlen, size_t outlen) in ecdh_derive() argument
557 return ecdh_plain_derive(vpecdhctx, secret, psecretlen, outlen); in ecdh_derive()
559 return ecdh_X9_63_kdf_derive(vpecdhctx, secret, psecretlen, outlen); in ecdh_derive()

Completed in 51 milliseconds

12345