| /netbsd-src/crypto/external/bsd/heimdal/dist/kadmin/ |
| H A D | get.c | 126 format_keytype(krb5_key_data *k, krb5_salt *def_salt, char *buf, size_t buf_len) in format_keytype() argument 141 strlcpy(buf, s, buf_len); in format_keytype() 144 strlcat(buf, "(", buf_len); in format_keytype() 155 strlcat(buf, s, buf_len); in format_keytype() 168 strlcat(buf, s, buf_len); in format_keytype() 173 strlcat(buf, ")", buf_len); in format_keytype() 175 strlcat(buf, s, buf_len); in format_keytype() 181 unsigned int subfield, char *buf, size_t buf_len, int condensed) in format_field() argument 186 krb5_unparse_name_fixed_short(context, princ->principal, buf, buf_len); in format_field() 188 krb5_unparse_name_fixed(context, princ->principal, buf, buf_len); in format_field() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/evp/ |
| H A D | bio_b64.c | 34 int buf_len; member 127 ctx->buf_len = 0; in b64_read() 134 if (ctx->buf_len > 0) { in b64_read() 135 OPENSSL_assert(ctx->buf_len >= ctx->buf_off); in b64_read() 136 i = ctx->buf_len - ctx->buf_off; in b64_read() 145 if (ctx->buf_len == ctx->buf_off) { in b64_read() 146 ctx->buf_len = 0; in b64_read() 280 ctx->buf_len = 0; in b64_read() 282 ctx->buf_len = z; in b64_read() 287 (unsigned char *)ctx->buf, &ctx->buf_len, in b64_read() [all …]
|
| H A D | bio_ok.c | 99 size_t buf_len; member 189 i = ctx->buf_len - ctx->buf_off; in ok_read() 199 if (ctx->buf_len == ctx->buf_off) { in ok_read() 206 ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; in ok_read() 208 ctx->buf_len); in ok_read() 210 ctx->buf_len = 0; in ok_read() 221 n = IOBS - ctx->buf_len; in ok_read() 222 i = BIO_read(next, &(ctx->buf[ctx->buf_len]), n); in ok_read() 227 ctx->buf_len += i; in ok_read() 277 n = ctx->buf_len - ctx->buf_off; in ok_write() [all …]
|
| H A D | bio_enc.c | 30 int buf_len; member 121 if (ctx->buf_len > 0) { in enc_read() 122 i = ctx->buf_len - ctx->buf_off; in enc_read() 130 if (ctx->buf_len == ctx->buf_off) { in enc_read() 131 ctx->buf_len = 0; in enc_read() 163 ctx->buf, &(ctx->buf_len)); in enc_read() 177 int j = outl - blocksize, buf_len; in enc_read() local 180 (unsigned char *)out, &buf_len, in enc_read() 185 ret += buf_len; in enc_read() 186 out += buf_len; in enc_read() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/evp/ |
| H A D | bio_b64.c | 34 int buf_len; member 129 ctx->buf_len = 0; in b64_read() 136 if (ctx->buf_len > 0) { in b64_read() 137 OPENSSL_assert(ctx->buf_len >= ctx->buf_off); in b64_read() 138 i = ctx->buf_len - ctx->buf_off; in b64_read() 147 if (ctx->buf_len == ctx->buf_off) { in b64_read() 148 ctx->buf_len = 0; in b64_read() 282 ctx->buf_len = 0; in b64_read() 284 ctx->buf_len = z; in b64_read() 289 (unsigned char *)ctx->buf, &ctx->buf_len, in b64_read() [all …]
|
| H A D | bio_ok.c | 98 size_t buf_len; member 190 i = ctx->buf_len - ctx->buf_off; in ok_read() 200 if (ctx->buf_len == ctx->buf_off) { in ok_read() 207 ctx->buf_len = ctx->buf_len_save - ctx->buf_off_save; in ok_read() 209 ctx->buf_len); in ok_read() 211 ctx->buf_len = 0; in ok_read() 222 n = IOBS - ctx->buf_len; in ok_read() 223 i = BIO_read(next, &(ctx->buf[ctx->buf_len]), n); in ok_read() 228 ctx->buf_len += i; in ok_read() 278 n = ctx->buf_len - ctx->buf_off; in ok_write() [all …]
|
| H A D | bio_enc.c | 28 int buf_len; member 121 if (ctx->buf_len > 0) { in enc_read() 122 i = ctx->buf_len - ctx->buf_off; in enc_read() 130 if (ctx->buf_len == ctx->buf_off) { in enc_read() 131 ctx->buf_len = 0; in enc_read() 163 ctx->buf, &(ctx->buf_len)); in enc_read() 177 int j = outl - blocksize, buf_len; in enc_read() local 180 (unsigned char *)out, &buf_len, in enc_read() 185 ret += buf_len; in enc_read() 186 out += buf_len; in enc_read() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/ec/ |
| H A D | ec_print.c | 19 size_t buf_len = 0; in EC_POINT_point2bn() local 22 buf_len = EC_POINT_point2buf(group, point, form, &buf, ctx); in EC_POINT_point2bn() 24 if (buf_len == 0) in EC_POINT_point2bn() 27 ret = BN_bin2bn(buf, buf_len, ret); in EC_POINT_point2bn() 37 size_t buf_len = 0; in EC_POINT_bn2point() local 41 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point() 42 buf_len = 1; in EC_POINT_bn2point() 43 if ((buf = OPENSSL_malloc(buf_len)) == NULL) { in EC_POINT_bn2point() 48 if (!BN_bn2binpad(bn, buf, buf_len)) { in EC_POINT_bn2point() 61 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ctx)) { in EC_POINT_bn2point() [all …]
|
| /netbsd-src/external/bsd/wpa/dist/src/crypto/ |
| H A D | aes-eax.c | 33 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 …]
|
| H A D | sha1-tprf.c | 30 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()
|
| H A D | sha512-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha512_prf() argument 34 buf_len * 8); in sha512_prf() 64 size_t buf_len = (buf_len_bits + 7) / 8; in sha512_prf_bits() local 77 while (pos < buf_len) { in sha512_prf_bits() 78 plen = buf_len - pos; in sha512_prf_bits()
|
| H A D | sha256-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha256_prf() argument 34 buf_len * 8); in sha256_prf() 64 size_t buf_len = (buf_len_bits + 7) / 8; in sha256_prf_bits() local 77 while (pos < buf_len) { in sha256_prf_bits() 78 plen = buf_len - pos; in sha256_prf_bits()
|
| H A D | sha384-prf.c | 31 const u8 *data, size_t data_len, u8 *buf, size_t buf_len) in sha384_prf() argument 34 buf_len * 8); in sha384_prf() 64 size_t buf_len = (buf_len_bits + 7) / 8; in sha384_prf_bits() local 77 while (pos < buf_len) { in sha384_prf_bits() 78 plen = buf_len - pos; in sha384_prf_bits()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/ec/ |
| H A D | ec_deprecated.c | 26 size_t buf_len = 0; in EC_POINT_point2bn() local 29 buf_len = EC_POINT_point2buf(group, point, form, &buf, ctx); in EC_POINT_point2bn() 31 if (buf_len == 0) in EC_POINT_point2bn() 34 ret = BN_bin2bn(buf, buf_len, ret); in EC_POINT_point2bn() 44 size_t buf_len = 0; in EC_POINT_bn2point() local 48 if ((buf_len = BN_num_bytes(bn)) == 0) in EC_POINT_bn2point() 49 buf_len = 1; in EC_POINT_bn2point() 50 if ((buf = OPENSSL_malloc(buf_len)) == NULL) { in EC_POINT_bn2point() 55 if (BN_bn2binpad(bn, buf, buf_len) < 0) { in EC_POINT_bn2point() 68 if (!EC_POINT_oct2point(group, ret, buf, buf_len, ctx)) { in EC_POINT_bn2point()
|
| /netbsd-src/external/gpl2/dtc/dist/ |
| H A D | fdtoverlay.c | 47 static void *apply_one(char *base, const char *overlay, size_t *buf_len, in apply_one() argument 61 tmp = xrealloc(tmp, *buf_len); in apply_one() 62 ret = fdt_open_into(base, tmp, *buf_len); in apply_one() 74 *buf_len += BUF_INCREMENT; in apply_one() 101 size_t buf_len; in do_fdtoverlay() local 104 blob = utilfdt_read(input_filename, &buf_len); in do_fdtoverlay() 109 if (fdt_totalsize(blob) > buf_len) { in do_fdtoverlay() 112 (unsigned long)buf_len, fdt_totalsize(blob)); in do_fdtoverlay() 138 buf_len = fdt_totalsize(blob); in do_fdtoverlay() 142 blob = apply_one(blob, ovblob[i], &buf_len, argv[i]); in do_fdtoverlay()
|
| /netbsd-src/external/bsd/wpa/dist/src/eap_peer/ |
| H A D | eap_fast_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_fast_read_line() 205 if (len >= rc->buf_len) in eap_fast_read_line() 206 len = rc->buf_len - 1; in eap_fast_read_line() 212 rc->buf[rc->buf_len - 1] = '\0'; in eap_fast_read_line() 258 rc->buf_len = 2048; in eap_fast_init_pac_data() 259 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 …]
|
| H A D | eap_teap_pac.c | 185 size_t buf_len; member 194 if (fgets(rc->buf, rc->buf_len, rc->f) == NULL) in eap_teap_read_line() 206 if (len >= rc->buf_len) in eap_teap_read_line() 207 len = rc->buf_len - 1; in eap_teap_read_line() 213 rc->buf[rc->buf_len - 1] = '\0'; in eap_teap_read_line() 259 rc->buf_len = 2048; in eap_teap_init_pac_data() 260 rc->buf = os_malloc(rc->buf_len); in eap_teap_init_pac_data() 478 static void eap_teap_write(char **buf, char **pos, size_t *buf_len, in eap_teap_write() argument 493 if (*pos - *buf + need > *buf_len) { in eap_teap_write() 494 char *nbuf = os_realloc(*buf, *buf_len + need); in eap_teap_write() [all …]
|
| /netbsd-src/crypto/external/bsd/openssh/dist/ |
| H A D | hmac.c | 34 size_t buf_len; member 55 ret->buf_len = ssh_digest_blocksize(ret->ictx); in ssh_hmac_start() 56 if ((ret->buf = calloc(1, ret->buf_len)) == NULL) in ssh_hmac_start() 72 if (klen <= ctx->buf_len) in ssh_hmac_init() 75 ctx->buf_len) < 0) in ssh_hmac_init() 77 for (i = 0; i < ctx->buf_len; i++) in ssh_hmac_init() 79 if (ssh_digest_update(ctx->ictx, ctx->buf, ctx->buf_len) < 0) in ssh_hmac_init() 81 for (i = 0; i < ctx->buf_len; i++) in ssh_hmac_init() 83 if (ssh_digest_update(ctx->octx, ctx->buf, ctx->buf_len) < 0) in ssh_hmac_init() 85 explicit_bzero(ctx->buf, ctx->buf_len); in ssh_hmac_init() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/apps/ |
| H A D | ecparam.c | 277 size_t buf_len = 0, tmp_len = 0; in ecparam_main() local 317 if ((tmp_len = (size_t)BN_num_bytes(ec_p)) > buf_len) in ecparam_main() 318 buf_len = tmp_len; in ecparam_main() 319 if ((tmp_len = (size_t)BN_num_bytes(ec_a)) > buf_len) in ecparam_main() 320 buf_len = tmp_len; in ecparam_main() 321 if ((tmp_len = (size_t)BN_num_bytes(ec_b)) > buf_len) in ecparam_main() 322 buf_len = tmp_len; in ecparam_main() 323 if ((tmp_len = (size_t)BN_num_bytes(ec_gen)) > buf_len) in ecparam_main() 324 buf_len = tmp_len; in ecparam_main() 325 if ((tmp_len = (size_t)BN_num_bytes(ec_order)) > buf_len) in ecparam_main() [all …]
|
| H A D | s_time.c | 105 int max_version = 0, ver, buf_len; in s_time_main() local 230 buf_len = BIO_snprintf(buf, sizeof(buf), fmt_http_get_cmd, in s_time_main() 232 if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0) in s_time_main() 285 buf_len = BIO_snprintf(buf, sizeof(buf), fmt_http_get_cmd, www_path); in s_time_main() 286 if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0) in s_time_main() 311 buf_len = BIO_snprintf(buf, sizeof(buf), fmt_http_get_cmd, in s_time_main() 313 if (buf_len <= 0 || SSL_write(scon, buf, buf_len) <= 0) in s_time_main()
|
| /netbsd-src/lib/libc/posix1e/ |
| H A D | acl_id_to_name.c | 62 _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 76 i = snprintf(buf, buf_len, "%d", id); in _posix1e_acl_id_to_name() 78 i = snprintf(buf, buf_len, "%s", p->pw_name); in _posix1e_acl_id_to_name() 92 i = snprintf(buf, buf_len, "%d", id); in _posix1e_acl_id_to_name() 94 i = snprintf(buf, buf_len, "%s", g->gr_name); in _posix1e_acl_id_to_name()
|
| /netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/objects/ |
| H A D | obj_dat.c | 397 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) in OBJ_obj2txt() argument 406 if (buf && buf_len > 0) in OBJ_obj2txt() 419 OPENSSL_strlcpy(buf, s, buf_len); in OBJ_obj2txt() 473 if (buf && (buf_len > 1)) { in OBJ_obj2txt() 476 buf_len--; in OBJ_obj2txt() 488 if (buf_len > 1) { in OBJ_obj2txt() 491 buf_len--; in OBJ_obj2txt() 493 OPENSSL_strlcpy(buf, bndec, buf_len); in OBJ_obj2txt() 494 if (i > buf_len) { in OBJ_obj2txt() 495 buf += buf_len; in OBJ_obj2txt() [all …]
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/objects/ |
| H A D | obj_dat.c | 412 int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name) in OBJ_obj2txt() argument 421 if (buf && buf_len > 0) in OBJ_obj2txt() 434 OPENSSL_strlcpy(buf, s, buf_len); in OBJ_obj2txt() 507 if (buf && (buf_len > 1)) { in OBJ_obj2txt() 510 buf_len--; in OBJ_obj2txt() 522 if (buf_len > 1) { in OBJ_obj2txt() 525 buf_len--; in OBJ_obj2txt() 527 OPENSSL_strlcpy(buf, bndec, buf_len); in OBJ_obj2txt() 528 if (i > buf_len) { in OBJ_obj2txt() 529 buf += buf_len; in OBJ_obj2txt() [all …]
|
| /netbsd-src/external/bsd/pkg_install/dist/create/ |
| H A D | build.c | 124 ssize_t buf_len; in write_entry() local 152 buf_len = (len > (off_t)sizeof(buf)) ? (ssize_t)sizeof(buf) : (ssize_t)len; in write_entry() 154 if ((buf_len = read(fd, buf, buf_len)) == 0) in write_entry() 156 else if (buf_len < 0) in write_entry() 159 archive_write_data(archive, buf, (size_t)buf_len); in write_entry() 160 len -= buf_len; in write_entry() 174 ssize_t buf_len; in write_normal_file() local 208 buf_len = readlink(name, buf, sizeof buf); in write_normal_file() 209 if (buf_len < 0) in write_normal_file() 211 buf[buf_len] = '\0'; in write_normal_file()
|
| /netbsd-src/sys/modules/examples/pollpal/ |
| H A D | pollpal.c | 99 size_t buf_len; member 154 kmem_free(pl->buf, pl->buf_len); in pollpal_close() 194 pl->buf_len = uio->uio_iov->iov_len; in pollpal_write() 195 pl->buf = kmem_alloc(pl->buf_len, KM_SLEEP); in pollpal_write() 196 uiomove(pl->buf, pl->buf_len, uio); in pollpal_write() 243 uiomove(pl->buf, pl->buf_len, uio); in pollpal_read() 245 if (check_pal(pl->buf, pl->buf_len)) in pollpal_read() 256 kmem_free(pl->buf, pl->buf_len); in pollpal_read()
|