Home
last modified time | relevance | path

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

12

/openssl/providers/implementations/ciphers/
H A Dciphercommon_block.c63 assert(*buflen <= blocksize); in ossl_cipher_fillblock()
71 *buflen += bufremain; in ossl_cipher_fillblock()
86 if (*buflen + *inlen > blocksize) { in ossl_cipher_trailingdata()
91 memcpy(buf + *buflen, *in, *inlen); in ossl_cipher_trailingdata()
92 *buflen += *inlen; in ossl_cipher_trailingdata()
104 for (i = *buflen; i < blocksize; i++) in ossl_cipher_padblock()
111 size_t len = *buflen; in ossl_cipher_unpadblock()
133 *buflen = len; in ossl_cipher_unpadblock()
168 return ssl3_cbc_remove_padding_and_mac(buflen, *buflen, buf, mac, in ossl_cipher_tlsunpadblock()
179 *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,
H A Dcipher_aes_ocb.c237 size_t *buflen; in aes_ocb_block_update() local
251 buflen = &ctx->aad_buf_len; in aes_ocb_block_update()
255 buflen = &ctx->data_buf_len; in aes_ocb_block_update()
258 return aes_ocb_block_update_internal(ctx, buf, buflen, out, outl, outsize, in aes_ocb_block_update()
/openssl/crypto/
H A Do_str.c173 if (buflen != NULL) in hexstr2buf_sep()
174 *buflen = cnt; in hexstr2buf_sep()
204 if (buflen != NULL) in ossl_hexstr2buf_sep()
205 *buflen = 0; in ossl_hexstr2buf_sep()
208 if (buflen != NULL) in ossl_hexstr2buf_sep()
209 *buflen = (long)tmp_buflen; in ossl_hexstr2buf_sep()
230 size_t len = has_sep ? buflen * 3 : 1 + buflen * 2; in buf2hexstr_sep()
271 if (buflen == 0) in ossl_buf2hexstr_sep()
274 tmp_n = (sep != CH_ZERO) ? buflen * 3 : 1 + buflen * 2; in ossl_buf2hexstr_sep()
310 if (err == NULL || buflen == 0) in openssl_strerror_r()
[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.c138 static int do_buf(unsigned char *buf, int buflen, in do_buf() argument
148 q = buf + buflen; in do_buf()
154 if (buflen & 3) { in do_buf()
160 if (buflen & 1) { in do_buf()
193 i = UTF8_getc(p, buflen, &c); in do_buf()
196 buflen -= i; in do_buf()
235 int buflen) in do_hex_dump() argument
242 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
115 buflen = (EC_GROUP_get_degree(group) + 7) / 8; in ossl_ecdh_simple_compute_key()
117 if (len > buflen) { in ossl_ecdh_simple_compute_key()
121 if ((buf = OPENSSL_malloc(buflen)) == NULL) { in ossl_ecdh_simple_compute_key()
126 memset(buf, 0, buflen - len); in ossl_ecdh_simple_compute_key()
127 if (len != (size_t)BN_bn2bin(x, buf + buflen - len)) { in ossl_ecdh_simple_compute_key()
133 *poutlen = buflen; in ossl_ecdh_simple_compute_key()
/openssl/providers/implementations/rands/seeding/
H A Drand_unix.c237 if (!ossl_assert(buflen % sizeof(long) == 0)) { in sysctl_random()
259 len = buflen > 256 ? 256 : buflen; in sysctl_random()
264 buflen -= len; in sysctl_random()
265 } while (buflen > 0); in sysctl_random()
363 if (getentropy(buf, buflen) == 0) in syscall_random()
364 return (ssize_t)buflen; in syscall_random()
371 return (ssize_t)buflen; in syscall_random()
388 return p_getentropy.f(buf, buflen) == 0 ? (ssize_t)buflen : -1; in syscall_random()
394 return syscall(__NR_getrandom, buf, buflen, 0); in syscall_random()
396 return sysctl_random(buf, buflen); in syscall_random()
[all …]
/openssl/providers/implementations/digests/
H A Dblake2s_prov.c262 fill = sizeof(c->buf) - c->buflen; in ossl_blake2s_update()
264 if (c->buflen) { in ossl_blake2s_update()
265 memcpy(c->buf + c->buflen, in, fill); /* Fill buffer */ in ossl_blake2s_update()
267 c->buflen = 0; in ossl_blake2s_update()
287 memcpy(c->buf + c->buflen, in, datalen); in ossl_blake2s_update()
288 c->buflen += datalen; /* Be lazy, do not compress */ in ossl_blake2s_update()
310 memset(c->buf + c->buflen, 0, sizeof(c->buf) - c->buflen); in ossl_blake2s_final()
311 blake2s_compress(c, c->buf, c->buflen); in ossl_blake2s_final()
H A Dblake2b_prov.c271 fill = sizeof(c->buf) - c->buflen; in ossl_blake2b_update()
273 if (c->buflen) { in ossl_blake2b_update()
274 memcpy(c->buf + c->buflen, in, fill); /* Fill buffer */ in ossl_blake2b_update()
276 c->buflen = 0; in ossl_blake2b_update()
296 memcpy(c->buf + c->buflen, in, datalen); in ossl_blake2b_update()
297 c->buflen += datalen; /* Be lazy, do not compress */ in ossl_blake2b_update()
319 memset(c->buf + c->buflen, 0, sizeof(c->buf) - c->buflen); in ossl_blake2b_final()
320 blake2b_compress(c, c->buf, c->buflen); in ossl_blake2b_final()
/openssl/apps/
H A Drand.c55 int format = FORMAT_BINARY, r, i, ret = 1, buflen = 131072; in rand_main() local
118 buf = app_malloc(buflen, "buffer for output file"); in rand_main()
122 chunk = (num > buflen) ? buflen : num; in rand_main()
H A Drehash.c353 int n, numfiles, nextid, buflen, errs = 0; in do_dir() local
364 buflen = strlen(dirname); in do_dir()
365 pathsep = (buflen && !ends_with_dirsep(dirname)) ? "/": ""; in do_dir()
366 buflen += NAME_MAX + 1 + 1; in do_dir()
367 buf = app_malloc(buflen, "filename buffer"); in do_dir()
392 if (BIO_snprintf(buf, buflen, "%s%s%s", in do_dir()
393 dirname, pathsep, filename) >= buflen) in do_dir()
415 BIO_snprintf(buf, buflen, "%08x.%s%d", bp->hash, in do_dir()
425 BIO_snprintf(buf, buflen, "%s%s%n%08x.%s%d", in do_dir()
447 BIO_snprintf(buf, buflen, "%s%s%n%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/include/internal/
H A Dcryptlib.h51 int openssl_strerror_r(int errnum, char *buf, size_t buflen);
158 char *ossl_buf2hexstr_sep(const unsigned char *buf, long buflen, char sep);
159 unsigned char *ossl_hexstr2buf_sep(const char *str, long *buflen,
/openssl/providers/implementations/kdfs/
H A Dpvkkdf.c117 static int pvk_set_membuf(unsigned char **buffer, size_t *buflen, in pvk_set_membuf() argument
120 OPENSSL_clear_free(*buffer, *buflen); in pvk_set_membuf()
122 *buflen = 0; in pvk_set_membuf()
130 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in pvk_set_membuf()
H A Dpbkdf1.c156 static int kdf_pbkdf1_set_membuf(unsigned char **buffer, size_t *buflen, in kdf_pbkdf1_set_membuf() argument
159 OPENSSL_clear_free(*buffer, *buflen); in kdf_pbkdf1_set_membuf()
161 *buflen = 0; in kdf_pbkdf1_set_membuf()
169 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in kdf_pbkdf1_set_membuf()
H A Dpbkdf2.c158 static int pbkdf2_set_membuf(unsigned char **buffer, size_t *buflen, in pbkdf2_set_membuf() argument
161 OPENSSL_clear_free(*buffer, *buflen); in pbkdf2_set_membuf()
163 *buflen = 0; in pbkdf2_set_membuf()
171 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in pbkdf2_set_membuf()
H A Dpkcs12kdf.c205 static int pkcs12kdf_set_membuf(unsigned char **buffer, size_t *buflen, in pkcs12kdf_set_membuf() argument
208 OPENSSL_clear_free(*buffer, *buflen); in pkcs12kdf_set_membuf()
210 *buflen = 0; in pkcs12kdf_set_membuf()
218 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in pkcs12kdf_set_membuf()
H A Dscrypt.c145 static int scrypt_set_membuf(unsigned char **buffer, size_t *buflen, in scrypt_set_membuf() argument
148 OPENSSL_clear_free(*buffer, *buflen); in scrypt_set_membuf()
150 *buflen = 0; in scrypt_set_membuf()
158 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in scrypt_set_membuf()
/openssl/providers/implementations/rands/
H A Ddrbg_ctr.c383 int outl, buflen; in drbg_ctr_generate() local
423 buflen = outlen > (1U << 30) ? (1U << 30) : outlen; in drbg_ctr_generate()
424 blocks = (buflen + 15) / 16; in drbg_ctr_generate()
431 buflen = blocks * 16; in drbg_ctr_generate()
438 if (!EVP_CipherUpdate(ctr->ctx_ctr, out, &outl, out, buflen) in drbg_ctr_generate()
439 || outl != buflen) in drbg_ctr_generate()
442 out += buflen; in drbg_ctr_generate()
443 outlen -= buflen; in drbg_ctr_generate()
/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c134 const unsigned char *buf, size_t buflen) in print_labeled_buf() argument
141 for (i = 0; i < buflen; i++) { in print_labeled_buf()
150 (i == buflen - 1) ? "" : ":") <= 0) in print_labeled_buf()
392 size_t buflen; in ec_param_explicit_gen_to_text() local
418 buflen = EC_POINT_point2buf(group, point, form, &buf, ctx); in ec_param_explicit_gen_to_text()
419 if (buflen == 0) in ec_param_explicit_gen_to_text()
422 ret = print_labeled_buf(out, glabel, buf, buflen); in ec_param_explicit_gen_to_text()
423 OPENSSL_clear_free(buf, buflen); in ec_param_explicit_gen_to_text()
/openssl/providers/implementations/include/prov/
H A Dblake2.h50 size_t buflen; member
75 size_t buflen; member
/openssl/crypto/http/
H A Dhttp_lib.c162 size_t buflen = 1 + path_end - path + 1; in OSSL_parse_url() local
164 if ((*ppath = OPENSSL_malloc(buflen)) == NULL) in OSSL_parse_url()
166 BIO_snprintf(*ppath, buflen, "/%s", path); in OSSL_parse_url()

Completed in 81 milliseconds

12