Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 52) sorted by relevance

123

/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c46 assert(*buflen <= blocksize); in ossl_cipher_fillblock()
54 *buflen += bufremain; in ossl_cipher_fillblock()
69 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
74 memcpy(buf + *buflen, *in, *inlen); in ossl_cipher_trailingdata()
75 *buflen += *inlen; in ossl_cipher_trailingdata()
87 for (i = *buflen; i < blocksize; i++) in ossl_cipher_padblock()
94 size_t len = *buflen; in ossl_cipher_unpadblock()
116 *buflen = len; in ossl_cipher_unpadblock()
151 return ssl3_cbc_remove_padding_and_mac(buflen, *buflen, buf, mac, in ossl_cipher_tlsunpadblock()
162 *buflen -= blocksize; in ossl_cipher_tlsunpadblock()
[all …]
H A Dciphercommon_local.h12 void ossl_cipher_padblock(unsigned char *buf, size_t *buflen, size_t blocksize);
13 int ossl_cipher_unpadblock(unsigned char *buf, size_t *buflen, size_t blocksize);
15 unsigned char *buf, size_t *buflen, size_t blocksize,
/openssl/crypto/
H A Do_str.c240 if (buflen != NULL) in hexstr2buf_sep()
241 *buflen = cnt; in hexstr2buf_sep()
269 if (buflen != NULL) in ossl_hexstr2buf_sep()
270 *buflen = 0; in ossl_hexstr2buf_sep()
273 if (buflen != NULL) in ossl_hexstr2buf_sep()
292 size_t i, len = has_sep ? buflen * 3 : 1 + buflen * 2; in buf2hexstr_sep()
307 for (i = 0; i < buflen; i++) { in buf2hexstr_sep()
312 if (has_sep && buflen > 0) in buf2hexstr_sep()
334 if (buflen == 0) in ossl_buf2hexstr_sep()
337 tmp_n = (sep != CH_ZERO) ? buflen * 3 : 1 + buflen * 2; in ossl_buf2hexstr_sep()
[all …]
/openssl/crypto/asn1/
H A Dt_pkey.c21 int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int indent) in ASN1_buf_print() argument
25 for (i = 0; i < buflen; i++) { in ASN1_buf_print()
37 (i == buflen - 1) ? "" : ":") <= 0) in ASN1_buf_print()
51 int buflen; in ASN1_bn_print() local
72 buflen = BN_num_bytes(num) + 1; in ASN1_bn_print()
73 buf = tmp = OPENSSL_malloc(buflen); in ASN1_bn_print()
91 OPENSSL_clear_free(buf, buflen); in ASN1_bn_print()
H A Da_strex.c139 static int do_buf(unsigned char *buf, int buflen, in do_buf() argument
149 q = buf + buflen; in do_buf()
155 if (buflen & 3) { in do_buf()
161 if (buflen & 1) { in do_buf()
194 i = UTF8_getc(p, buflen, &c); in do_buf()
197 buflen -= i; in do_buf()
236 int buflen) in do_hex_dump() argument
243 q = buf + buflen; in do_hex_dump()
251 return buflen << 1; in do_hex_dump()
H A Dbio_asn1.c49 int buflen; member
190 ctx->buflen = ASN1_object_size(0, inl, ctx->asn1_tag) - inl; in asn1_bio_write()
191 if (!ossl_assert(ctx->buflen <= ctx->bufsize)) in asn1_bio_write()
201 ret = BIO_write(next, ctx->buf + ctx->bufpos, ctx->buflen); in asn1_bio_write()
205 ctx->buflen -= ret; in asn1_bio_write()
206 if (ctx->buflen) in asn1_bio_write()
H A Da_int.c620 size_t buflen; in ossl_c2i_uint64_int() local
622 buflen = c2i_ibuf(NULL, NULL, *pp, len); in ossl_c2i_uint64_int()
623 if (buflen == 0) in ossl_c2i_uint64_int()
625 if (buflen > sizeof(uint64_t)) { in ossl_c2i_uint64_int()
630 return asn1_get_uint64(ret, buf, buflen); in ossl_c2i_uint64_int()
/openssl/crypto/ec/
H A Decdh_ossl.c58 size_t buflen, len; in ossl_ecdh_simple_compute_key() local
118 buflen = (EC_GROUP_get_degree(group) + 7) / 8; in ossl_ecdh_simple_compute_key()
120 if (len > buflen) { in ossl_ecdh_simple_compute_key()
124 if ((buf = OPENSSL_malloc(buflen)) == NULL) in ossl_ecdh_simple_compute_key()
127 memset(buf, 0, buflen - len); in ossl_ecdh_simple_compute_key()
128 if (len != (size_t)BN_bn2bin(x, buf + buflen - len)) { in ossl_ecdh_simple_compute_key()
134 *poutlen = buflen; in ossl_ecdh_simple_compute_key()
/openssl/providers/implementations/rands/seeding/
H A Drand_unix.c254 len = buflen > 256 ? 256 : buflen; in sysctl_random()
259 buflen -= len; in sysctl_random()
260 } while (buflen > 0); in sysctl_random()
356 if (getentropy(buf, buflen) == 0) in syscall_random()
357 return (ssize_t)buflen; in syscall_random()
364 return (ssize_t)buflen; in syscall_random()
381 return p_getentropy.f(buf, buflen) == 0 ? (ssize_t)buflen : -1; in syscall_random()
389 return sysctl_random(buf, buflen); in syscall_random()
392 return getrandom(buf, buflen, 0); in syscall_random()
394 if (getentropy(buf, buflen) == 0) in syscall_random()
[all …]
/openssl/ssl/record/methods/
H A Dtls_multib.c87 || templates[i - 1].buflen != templates[i].buflen in tls_write_records_multiblock_int()
88 || templates[i - 1].buf + templates[i - 1].buflen in tls_write_records_multiblock_int()
93 totlen = templates[0].buflen * numtempl; in tls_write_records_multiblock_int()
95 templates[0].buflen)) in tls_write_records_multiblock_int()
113 (int)templates[0].buflen, NULL); in tls_write_records_multiblock_int()
/openssl/providers/implementations/digests/
H A Dblake2b_prov.c272 fill = sizeof(c->buf) - c->buflen; in ossl_blake2b_update()
274 if (c->buflen) { in ossl_blake2b_update()
275 memcpy(c->buf + c->buflen, in, fill); /* Fill buffer */ in ossl_blake2b_update()
277 c->buflen = 0; in ossl_blake2b_update()
297 memcpy(c->buf + c->buflen, in, datalen); in ossl_blake2b_update()
298 c->buflen += datalen; /* Be lazy, do not compress */ in ossl_blake2b_update()
320 memset(c->buf + c->buflen, 0, sizeof(c->buf) - c->buflen); in ossl_blake2b_final()
321 blake2b_compress(c, c->buf, c->buflen); in ossl_blake2b_final()
H A Dblake2s_prov.c260 fill = sizeof(c->buf) - c->buflen; in ossl_blake2s_update()
262 if (c->buflen) { in ossl_blake2s_update()
263 memcpy(c->buf + c->buflen, in, fill); /* Fill buffer */ in ossl_blake2s_update()
265 c->buflen = 0; in ossl_blake2s_update()
285 memcpy(c->buf + c->buflen, in, datalen); in ossl_blake2s_update()
286 c->buflen += datalen; /* Be lazy, do not compress */ in ossl_blake2s_update()
308 memset(c->buf + c->buflen, 0, sizeof(c->buf) - c->buflen); in ossl_blake2s_final()
309 blake2s_compress(c, c->buf, c->buflen); in ossl_blake2s_final()
/openssl/apps/
H A Drand.c56 size_t buflen = (1 << 16); /* max rand chunk size is 2^16 bytes */ in rand_main() local
197 buf = app_malloc(buflen, "buffer for output file"); in rand_main()
201 chunk = scaled_num > buflen ? (int)buflen : (int)scaled_num; in rand_main()
H A Drehash.c356 int n, numfiles, nextid, dirlen, buflen, errs = 0; in do_dir() local
398 buflen = dirlen + fname_max_len + 1; in do_dir()
399 buf = app_malloc(buflen, "filename buffer"); in do_dir()
404 if (BIO_snprintf(buf, buflen, "%s%s%s", in do_dir()
405 dirname, pathsep, filename) >= buflen) in do_dir()
427 BIO_snprintf(buf, buflen, "%08x.%s%d", bp->hash, in do_dir()
437 BIO_snprintf(buf, buflen, "%s%s%08x.%s%d", in do_dir()
459 BIO_snprintf(buf, buflen, "%s%s%08x.%s%d", in do_dir()
/openssl/doc/man3/
H A DOPENSSL_hexchar2int.pod15 int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, long *buflen,
19 const unsigned char *buf, long buflen,
21 char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen);
33 If I<buflen> is not NULL, it is filled in with the result length.
46 length I<buflen> and places the resulting hexadecimal character string
/openssl/test/
H A Dbio_base64_test.c93 static int encode(unsigned const char *buf, unsigned buflen, char *encoded, in encode() argument
109 while (buflen > 2) { in encode()
118 buflen -= 3; in encode()
122 if (buflen == 2) { in encode()
130 } else if (buflen == 1) { in encode()
152 unsigned buflen, int trunc, char *encoded, unsigned llen, in genb64() argument
167 || encode(buf, buflen, encoded, trunc, llen, wscnt, mem) <= 0 in genb64()
/openssl/include/internal/
H A Dcryptlib.h50 int openssl_strerror_r(int errnum, char *buf, size_t buflen);
161 char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
162 unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
/openssl/providers/implementations/kdfs/
H A Dpvkkdf.c116 static int pvk_set_membuf(unsigned char **buffer, size_t *buflen, in pvk_set_membuf() argument
119 OPENSSL_clear_free(*buffer, *buflen); in pvk_set_membuf()
121 *buflen = 0; in pvk_set_membuf()
127 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in pvk_set_membuf()
H A Dpbkdf1.c160 static int kdf_pbkdf1_set_membuf(unsigned char **buffer, size_t *buflen, in kdf_pbkdf1_set_membuf() argument
163 OPENSSL_clear_free(*buffer, *buflen); in kdf_pbkdf1_set_membuf()
165 *buflen = 0; in kdf_pbkdf1_set_membuf()
171 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in kdf_pbkdf1_set_membuf()
H A Dargon2.c1234 size_t buflen; in kdf_argon2_ctx_set_secret() local
1248 if (buflen > ARGON2_MAX_SECRET) { in kdf_argon2_ctx_set_secret()
1255 ctx->secretlen = (uint32_t) buflen; in kdf_argon2_ctx_set_secret()
1261 size_t buflen; in kdf_argon2_ctx_set_pwd() local
1275 if (buflen > ARGON2_MAX_PWD_LENGTH) { in kdf_argon2_ctx_set_pwd()
1281 ctx->pwdlen = (uint32_t) buflen; in kdf_argon2_ctx_set_pwd()
1293 size_t buflen; in kdf_argon2_ctx_set_salt() local
1319 ctx->saltlen = (uint32_t) buflen; in kdf_argon2_ctx_set_salt()
1331 size_t buflen; in kdf_argon2_ctx_set_ad() local
1345 if (buflen > ARGON2_MAX_AD_LENGTH) { in kdf_argon2_ctx_set_ad()
[all …]
H A Dpkcs12kdf.c201 static int pkcs12kdf_set_membuf(unsigned char **buffer, size_t *buflen, in pkcs12kdf_set_membuf() argument
204 OPENSSL_clear_free(*buffer, *buflen); in pkcs12kdf_set_membuf()
206 *buflen = 0; in pkcs12kdf_set_membuf()
212 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in pkcs12kdf_set_membuf()
/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c135 const unsigned char *buf, size_t buflen) in print_labeled_buf() argument
142 for (i = 0; i < buflen; i++) { in print_labeled_buf()
151 (i == buflen - 1) ? "" : ":") <= 0) in print_labeled_buf()
393 size_t buflen; in ec_param_explicit_gen_to_text() local
419 buflen = EC_POINT_point2buf(group, point, form, &buf, ctx); in ec_param_explicit_gen_to_text()
420 if (buflen == 0) in ec_param_explicit_gen_to_text()
423 ret = print_labeled_buf(out, glabel, buf, buflen); in ec_param_explicit_gen_to_text()
424 OPENSSL_clear_free(buf, buflen); in ec_param_explicit_gen_to_text()
/openssl/providers/implementations/rands/
H A Ddrbg_ctr.c394 int outl, buflen; in drbg_ctr_generate() local
434 buflen = outlen > (1U << 30) ? (1U << 30) : outlen; in drbg_ctr_generate()
435 blocks = (buflen + 15) / 16; in drbg_ctr_generate()
442 buflen = blocks * 16; in drbg_ctr_generate()
449 if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen) in drbg_ctr_generate()
450 || outl != buflen) in drbg_ctr_generate()
453 out += buflen; in drbg_ctr_generate()
454 outlen -= buflen; in drbg_ctr_generate()
/openssl/ssl/quic/
H A Dquic_tls.c274 dummyrec[3] = (unsigned char)((template->buflen >> 8) & 0xff); in quic_write_records()
275 dummyrec[4] = (unsigned char)(template->buflen & 0xff); in quic_write_records()
288 if (template->buflen != 2) { in quic_write_records()
315 template->buflen - rl->written, in quic_write_records()
325 if (consumed + rl->written != template->buflen) { in quic_write_records()
326 if (!ossl_assert(consumed + rl->written < template->buflen)) { in quic_write_records()
/openssl/providers/implementations/include/prov/
H A Dblake2.h51 size_t buflen; member
76 size_t buflen; member

Completed in 50 milliseconds

123