Home
last modified time | relevance | path

Searched refs:buf_len (Results 1 – 25 of 131) sorted by relevance

123456

/NextBSD/crypto/openssl/crypto/evp/
HDbio_b64.c85 int buf_len; member
122 ctx->buf_len = 0; in b64_new()
165 ctx->buf_len = 0; in b64_read()
172 if (ctx->buf_len > 0) { in b64_read()
173 OPENSSL_assert(ctx->buf_len >= ctx->buf_off); in b64_read()
174 i = ctx->buf_len - ctx->buf_off; in b64_read()
183 if (ctx->buf_len == ctx->buf_off) { in b64_read()
184 ctx->buf_len = 0; in b64_read()
322 ctx->buf_len = 0; in b64_read()
324 ctx->buf_len = z; in b64_read()
[all …]
HDbio_ok.c146 size_t buf_len; member
183 ctx->buf_len = 0; in ok_new()
229 i = ctx->buf_len - ctx->buf_off; in ok_read()
239 if (ctx->buf_len == ctx->buf_off) { in ok_read()
246 ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; in ok_read()
248 ctx->buf_len); in ok_read()
250 ctx->buf_len = 0; in ok_read()
261 n = IOBS - ctx->buf_len; in ok_read()
262 i = BIO_read(b->next_bio, &(ctx->buf[ctx->buf_len]), n); in ok_read()
267 ctx->buf_len += i; in ok_read()
[all …]
HDbio_enc.c81 int buf_len; member
120 ctx->buf_len = 0; in enc_new()
161 if (ctx->buf_len > 0) { in enc_read()
162 i = ctx->buf_len - ctx->buf_off; in enc_read()
170 if (ctx->buf_len == ctx->buf_off) { in enc_read()
171 ctx->buf_len = 0; in enc_read()
196 &(ctx->buf_len)); in enc_read()
205 (unsigned char *)ctx->buf, &ctx->buf_len, in enc_read()
214 if (ctx->buf_len == 0) in enc_read()
218 if (ctx->buf_len <= outl) in enc_read()
[all …]
/NextBSD/crypto/heimdal/kadmin/
HDget.c122 format_keytype(krb5_key_data *k, krb5_salt *def_salt, char *buf, size_t buf_len) in format_keytype() argument
132 strlcpy(buf, s, buf_len); in format_keytype()
135 strlcat(buf, "(", buf_len); in format_keytype()
143 strlcat(buf, s, buf_len); in format_keytype()
153 strlcat(buf, s, buf_len); in format_keytype()
156 strlcat(buf, ")", buf_len); in format_keytype()
161 unsigned int subfield, char *buf, size_t buf_len, int condensed) in format_field() argument
166 krb5_unparse_name_fixed_short(context, princ->principal, buf, buf_len); in format_field()
168 krb5_unparse_name_fixed(context, princ->principal, buf, buf_len); in format_field()
172 time_t2str(princ->princ_expire_time, buf, buf_len, !condensed); in format_field()
[all …]
/NextBSD/crypto/openssl/crypto/ec/
HDec_print.c64 size_t buf_len = 0; in EC_POINT_point2bn() local
67 buf_len = EC_POINT_point2oct(group, point, form, NULL, 0, ctx); in EC_POINT_point2bn()
68 if (buf_len == 0) in EC_POINT_point2bn()
71 if ((buf = OPENSSL_malloc(buf_len)) == NULL) in EC_POINT_point2bn()
74 if (!EC_POINT_point2oct(group, point, form, buf, buf_len, ctx)) { in EC_POINT_point2bn()
79 ret = BN_bin2bn(buf, buf_len, ret); in EC_POINT_point2bn()
89 size_t buf_len = 0; in EC_POINT_bn2point() local
93 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point()
95 buf = OPENSSL_malloc(buf_len); in EC_POINT_bn2point()
112 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ctx)) { in EC_POINT_bn2point()
[all …]
HDeck_prn.c147 size_t buf_len = 0, i; in ECPKParameters_print() local
241 buf_len = (size_t)BN_num_bytes(p); in ECPKParameters_print()
242 if (buf_len < (i = (size_t)BN_num_bytes(a))) in ECPKParameters_print()
243 buf_len = i; in ECPKParameters_print()
244 if (buf_len < (i = (size_t)BN_num_bytes(b))) in ECPKParameters_print()
245 buf_len = i; in ECPKParameters_print()
246 if (buf_len < (i = (size_t)BN_num_bytes(gen))) in ECPKParameters_print()
247 buf_len = i; in ECPKParameters_print()
248 if (buf_len < (i = (size_t)BN_num_bytes(order))) in ECPKParameters_print()
249 buf_len = i; in ECPKParameters_print()
[all …]
/NextBSD/contrib/wpa/src/crypto/
HDaes-eax.c33 size_t buf_len; in aes_128_eax_encrypt() local
39 buf_len = nonce_len; in aes_128_eax_encrypt()
41 buf_len = data_len; in aes_128_eax_encrypt()
42 if (hdr_len > buf_len) in aes_128_eax_encrypt()
43 buf_len = hdr_len; in aes_128_eax_encrypt()
44 buf_len += 16; in aes_128_eax_encrypt()
46 buf = os_malloc(buf_len); in aes_128_eax_encrypt()
74 bin_clear_free(buf, buf_len); in aes_128_eax_encrypt()
97 size_t buf_len; in aes_128_eax_decrypt() local
103 buf_len = nonce_len; in aes_128_eax_decrypt()
[all …]
HDsha1-tprf.c30 const u8 *seed, size_t seed_len, u8 *buf, size_t buf_len) in sha1_t_prf() argument
51 output_len[0] = (buf_len >> 8) & 0xff; in sha1_t_prf()
52 output_len[1] = buf_len & 0xff; in sha1_t_prf()
54 while (pos < buf_len) { in sha1_t_prf()
56 plen = buf_len - pos; in sha1_t_prf()
HDsha256-prf.c30 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha256_prf() argument
32 sha256_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8); in sha256_prf()
61 size_t buf_len = (buf_len_bits + 7) / 8; in sha256_prf_bits() local
74 while (pos < buf_len) { in sha256_prf_bits()
75 plen = buf_len - pos; in sha256_prf_bits()
HDsha384-prf.c30 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument
32 sha384_prf_bits(key, key_len, label, data, data_len, buf, buf_len * 8); in sha384_prf()
61 size_t buf_len = (buf_len_bits + 7) / 8; in sha384_prf_bits() local
74 while (pos < buf_len) { in sha384_prf_bits()
75 plen = buf_len - pos; in sha384_prf_bits()
/NextBSD/crypto/openssh/
HDhmac.c33 size_t buf_len; member
54 ret->buf_len = ssh_digest_blocksize(ret->ictx); in ssh_hmac_start()
55 if ((ret->buf = calloc(1, ret->buf_len)) == NULL) in ssh_hmac_start()
71 if (klen <= ctx->buf_len) in ssh_hmac_init()
74 ctx->buf_len) < 0) in ssh_hmac_init()
76 for (i = 0; i < ctx->buf_len; i++) in ssh_hmac_init()
78 if (ssh_digest_update(ctx->ictx, ctx->buf, ctx->buf_len) < 0) in ssh_hmac_init()
80 for (i = 0; i < ctx->buf_len; i++) in ssh_hmac_init()
82 if (ssh_digest_update(ctx->octx, ctx->buf, ctx->buf_len) < 0) in ssh_hmac_init()
84 explicit_bzero(ctx->buf, ctx->buf_len); in ssh_hmac_init()
[all …]
HDssh-pkcs11-helper.c210 u_int buf_len; in process() local
215 buf_len = buffer_len(&iqueue); in process()
216 if (buf_len < 5) in process()
224 if (buf_len < msg_len + 4) in process()
227 buf_len -= 4; in process()
247 if (buf_len < buffer_len(&iqueue)) { in process()
251 consumed = buf_len - buffer_len(&iqueue); in process()
/NextBSD/contrib/wpa/src/eap_peer/
HDeap_fast_pac.c186 size_t buf_len; member
195 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line()
206 if (len >= rc->buf_len) in eap_fast_read_line()
207 len = rc->buf_len - 1; in eap_fast_read_line()
213 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line()
259 rc->buf_len = 2048; in eap_fast_init_pac_data()
260 rc->buf = os_malloc(rc->buf_len); in eap_fast_init_pac_data()
477 static void eap_fast_write(char **buf, char **pos, size_t *buf_len, in eap_fast_write() argument
493 if (*pos - *buf + need > *buf_len) { in eap_fast_write()
494 char *nbuf = os_realloc(*buf, *buf_len + need); in eap_fast_write()
[all …]
/NextBSD/contrib/byacc/
HDmstring.c18 static size_t buf_len; variable
32 if (buf_len == 0) in msprintf()
34 buf_ptr = malloc(buf_len = 4096); in msprintf()
45 len = (size_t) vsnprintf(buf_ptr, buf_len, fmt, args); in msprintf()
47 if ((changed = (len > buf_len)) != 0) in msprintf()
49 char *new_ptr = realloc(buf_ptr, (buf_len * 3) / 2); in msprintf()
64 if (len >= buf_len) in msprintf()
204 buf_len = 0; in mstring_leaks()
/NextBSD/lib/libc/posix1e/
HDacl_id_to_name.c57 _posix1e_acl_id_to_name(acl_tag_t tag, uid_t id, ssize_t buf_len, char *buf, in _posix1e_acl_id_to_name() argument
71 i = snprintf(buf, buf_len, "%d", id); in _posix1e_acl_id_to_name()
73 i = snprintf(buf, buf_len, "%s", p->pw_name); in _posix1e_acl_id_to_name()
87 i = snprintf(buf, buf_len, "%d", id); in _posix1e_acl_id_to_name()
89 i = snprintf(buf, buf_len, "%s", g->gr_name); in _posix1e_acl_id_to_name()
/NextBSD/crypto/openssl/crypto/objects/
HDobj_dat.c485 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) in OBJ_obj2txt() argument
494 if (buf && buf_len > 0) in OBJ_obj2txt()
507 BUF_strlcpy(buf, s, buf_len); in OBJ_obj2txt()
561 if (buf && (buf_len > 1)) { in OBJ_obj2txt()
564 buf_len--; in OBJ_obj2txt()
576 if (buf_len > 1) { in OBJ_obj2txt()
579 buf_len--; in OBJ_obj2txt()
581 BUF_strlcpy(buf, bndec, buf_len); in OBJ_obj2txt()
582 if (i > buf_len) { in OBJ_obj2txt()
583 buf += buf_len; in OBJ_obj2txt()
[all …]
/NextBSD/crypto/openssl/apps/
HDecparam.c430 size_t buf_len = 0, tmp_len = 0; in MAIN() local
469 if ((tmp_len = (size_t)BN_num_bytes(ec_p)) > buf_len) in MAIN()
470 buf_len = tmp_len; in MAIN()
471 if ((tmp_len = (size_t)BN_num_bytes(ec_a)) > buf_len) in MAIN()
472 buf_len = tmp_len; in MAIN()
473 if ((tmp_len = (size_t)BN_num_bytes(ec_b)) > buf_len) in MAIN()
474 buf_len = tmp_len; in MAIN()
475 if ((tmp_len = (size_t)BN_num_bytes(ec_gen)) > buf_len) in MAIN()
476 buf_len = tmp_len; in MAIN()
477 if ((tmp_len = (size_t)BN_num_bytes(ec_order)) > buf_len) in MAIN()
[all …]
/NextBSD/sys/dev/usb/input/
HDuep.c99 uint8_t buf_len; member
218 if (sc->buf_len > 0) { in uep_intr_callback()
221 if (sc->buf_len == 1) in uep_intr_callback()
227 res = pkt_len - sc->buf_len; in uep_intr_callback()
228 memcpy(sc->buf + sc->buf_len, buf, res); in uep_intr_callback()
230 sc->buf_len = 0; in uep_intr_callback()
239 sc->buf_len = 1; in uep_intr_callback()
254 sc->buf_len = len; in uep_intr_callback()
340 sc->buf_len = 0; in uep_attach()
/NextBSD/contrib/wpa/src/eap_common/
HDeap_peap_common.c17 u8 *buf, size_t buf_len) in peap_prfplus() argument
60 extra[0] = buf_len & 0xff; in peap_prfplus()
69 while (pos < buf_len) { in peap_prfplus()
71 plen = buf_len - pos; in peap_prfplus()
/NextBSD/crypto/heimdal/lib/roken/
HDparse_reply-test.c52 size_t buf_len; member
117 buf = p2 - t->buf_len; in main()
118 memcpy (buf, t->buf, t->buf_len); in main()
119 parse_reply (buf, t->buf_len); in main()
/NextBSD/crypto/openssl/crypto/
HDmem_dbg.c677 int buf_len; in print_leak_doall_arg() local
686 buf_len = strlen(buf); in print_leak_doall_arg()
688 if (128 - buf_len - 3 < info_len) { in print_leak_doall_arg()
689 memcpy(buf + buf_len, amip->info, 128 - buf_len - 3); in print_leak_doall_arg()
690 buf_len = 128 - 3; in print_leak_doall_arg()
692 BUF_strlcpy(buf + buf_len, amip->info, sizeof buf - buf_len); in print_leak_doall_arg()
693 buf_len = strlen(buf); in print_leak_doall_arg()
695 BIO_snprintf(buf + buf_len, sizeof buf - buf_len, "\"\n"); in print_leak_doall_arg()
/NextBSD/contrib/wpa/src/ap/
HDpeerkey_auth.c88 size_t buf_len; in wpa_smk_m1() local
117 buf_len = kde.rsn_ie_len + 2 + RSN_SELECTOR_LEN + ETH_ALEN; in wpa_smk_m1()
118 buf = os_malloc(buf_len); in wpa_smk_m1()
152 size_t buf_len; in wpa_send_smk_m4() local
161 buf_len = 2 + RSN_SELECTOR_LEN + ETH_ALEN + in wpa_send_smk_m4()
165 pos = buf = os_malloc(buf_len); in wpa_send_smk_m4()
205 size_t buf_len; in wpa_send_smk_m5() local
214 buf_len = kde->rsn_ie_len + in wpa_send_smk_m5()
219 pos = buf = os_malloc(buf_len); in wpa_send_smk_m5()
/NextBSD/contrib/wpa/src/pae/
HDieee802_1x_key.c40 int lab_len, ctx_len, ret_len, buf_len; in aes_kdf_128() local
46 buf_len = lab_len + ctx_len + 4; in aes_kdf_128()
54 buf = os_zalloc(buf_len); in aes_kdf_128()
60 WPA_PUT_BE16(&buf[buf_len - 2], ret_bits); in aes_kdf_128()
64 if (omac1_aes_128(kdk, buf, buf_len, ret)) { in aes_kdf_128()
/NextBSD/crypto/openssl/crypto/dsa/
HDdsa_ameth.c418 size_t buf_len = 0; in do_dsa_print() local
440 update_buflen(x->p, &buf_len); in do_dsa_print()
441 update_buflen(x->q, &buf_len); in do_dsa_print()
442 update_buflen(x->g, &buf_len); in do_dsa_print()
443 update_buflen(priv_key, &buf_len); in do_dsa_print()
444 update_buflen(pub_key, &buf_len); in do_dsa_print()
446 m = (unsigned char *)OPENSSL_malloc(buf_len + 10); in do_dsa_print()
544 size_t buf_len = 0; in dsa_sig_print() local
546 update_buflen(dsa_sig->r, &buf_len); in dsa_sig_print()
547 update_buflen(dsa_sig->s, &buf_len); in dsa_sig_print()
[all …]
/NextBSD/contrib/wpa/wpa_supplicant/
HDp2p_supplicant_sd.c102 static int p2p_sd_dns_uncompress(char *buf, size_t buf_len, const u8 *msg, in p2p_sd_dns_uncompress() argument
112 if (buf_len < 2) in p2p_sd_dns_uncompress()
129 uend = buf + buf_len; in p2p_sd_dns_uncompress()
699 size_t buf_len; in wpas_sd_request() local
704 buf_len = 2 * tlvs_len + 1; in wpas_sd_request()
705 buf = os_malloc(buf_len); in wpas_sd_request()
707 wpa_snprintf_hex(buf, buf_len, tlvs, tlvs_len); in wpas_sd_request()
826 size_t buf_len; in wpas_sd_p2ps_serv_response() local
854 buf_len = WPA_GET_LE16(pos); in wpas_sd_p2ps_serv_response()
858 if (buf_len > (unsigned int) (tlv_end - pos)) in wpas_sd_p2ps_serv_response()
[all …]

123456