| /openbsd-src/lib/libcrypto/ec/ |
| H A D | ec_print.c | |
| H A D | ec_asn1.c | 1441 size_t buf_len = 0; 1450 ec_key->conv_form, &buf, &buf_len, NULL)) 1452 if (buf_len > INT_MAX) 1457 memcpy(*out, buf, buf_len); 1458 *out += buf_len; 1464 ret = buf_len; 1467 freezero(buf, buf_len); 1154 size_t buf_len = 0, tmp_len; i2d_ECPrivateKey() local 1305 size_t buf_len = 0; i2o_ECPublicKey() local
|
| /openbsd-src/lib/libcrypto/evp/ |
| H A D | bio_b64.c | 85 int buf_len; member 125 ctx->buf_len = 0; in b64_new() 170 ctx->buf_len = 0; in b64_read() 177 if (ctx->buf_len > 0) { in b64_read() 178 OPENSSL_assert(ctx->buf_len >= ctx->buf_off); in b64_read() 179 i = ctx->buf_len - ctx->buf_off; in b64_read() 188 if (ctx->buf_len == ctx->buf_off) { in b64_read() 189 ctx->buf_len = 0; in b64_read() 316 ctx->buf_len = 0; in b64_read() 318 ctx->buf_len = z; in b64_read() [all …]
|
| H A D | bio_enc.c | 82 int buf_len; member 173 if (ctx->buf_len > 0) { in enc_read() 174 i = ctx->buf_len - ctx->buf_off; in enc_read() 182 if (ctx->buf_len == ctx->buf_off) { in enc_read() 183 ctx->buf_len = 0; in enc_read() 206 &(ctx->buf_len)); in enc_read() 215 (unsigned char *)ctx->buf, &ctx->buf_len, in enc_read() 224 if (ctx->buf_len == 0) in enc_read() 228 if (ctx->buf_len <= outl) in enc_read() 229 i = ctx->buf_len; in enc_read() [all …]
|
| /openbsd-src/lib/libcurses/tinfo/ |
| H A D | setbuf.c | 108 unsigned buf_len; in NCURSES_EXPORT() local 119 buf_len = min(LINES * (COLS + 6), 2800); in NCURSES_EXPORT() 121 if ((buf_ptr = typeMalloc(char, buf_len)) == NULL) in NCURSES_EXPORT() 134 buf_len = 0; in NCURSES_EXPORT() 141 (void) setvbuf(ofp, buf_ptr, buf_len, buf_len ? _IOFBF : _IOLBF); in NCURSES_EXPORT() 143 (void) setvbuf(ofp, buf_ptr, buf_len ? _IOFBF : _IOLBF, buf_len); in NCURSES_EXPORT() 146 (void) setbuffer(ofp, buf_ptr, (int) buf_len); in NCURSES_EXPORT()
|
| /openbsd-src/lib/libcrypto/bio/ |
| H A D | bss_mem.c | 123 BIO_new_mem_buf(const void *buf, int buf_len) in BIO_new_mem_buf() argument 132 if (buf_len == -1) in BIO_new_mem_buf() 133 buf_len = strlen(buf); in BIO_new_mem_buf() 134 if (buf_len < 0) { in BIO_new_mem_buf() 144 bm->buf->length = buf_len; in BIO_new_mem_buf() 145 bm->buf->max = buf_len; in BIO_new_mem_buf() 225 size_t buf_len; in mem_write() local 248 buf_len = bm->buf->length + in_len; in mem_write() 249 if (buf_len < bm->buf->length || buf_len > INT_MAX) in mem_write() 252 if (BUF_MEM_grow_clean(bm->buf, buf_len) != buf_len) in mem_write() [all …]
|
| /openbsd-src/usr.bin/ssh/ |
| H A D | hmac.c | 32 size_t buf_len; member 53 ret->buf_len = ssh_digest_blocksize(ret->ictx); in ssh_hmac_start() 54 if ((ret->buf = calloc(1, ret->buf_len)) == NULL) in ssh_hmac_start() 70 if (klen <= ctx->buf_len) in ssh_hmac_init() 73 ctx->buf_len) < 0) in ssh_hmac_init() 75 for (i = 0; i < ctx->buf_len; i++) in ssh_hmac_init() 77 if (ssh_digest_update(ctx->ictx, ctx->buf, ctx->buf_len) < 0) in ssh_hmac_init() 79 for (i = 0; i < ctx->buf_len; i++) in ssh_hmac_init() 81 if (ssh_digest_update(ctx->octx, ctx->buf, ctx->buf_len) < 0) in ssh_hmac_init() 83 explicit_bzero(ctx->buf, ctx->buf_len); in ssh_hmac_init() [all …]
|
| H A D | ssh-pkcs11-helper.c | 258 u_int buf_len; in process() 264 buf_len = sshbuf_len(iqueue); in process() 265 if (buf_len < 5) in process() 273 if (buf_len < msg_len + 4) in process() 278 buf_len -= 4; in process() 297 if (buf_len < sshbuf_len(iqueue)) { in process() 301 consumed = buf_len - sshbuf_len(iqueue); in cleanup_exit() 246 u_int buf_len; process() local
|
| H A D | crypto_api.h | 23 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len)) argument
|
| /openbsd-src/regress/lib/libssl/bytestring/ |
| H A D | bytestringtest.c | 323 size_t buf_len; in test_cbb_basic() local 338 CHECK_GOTO(CBB_finish(&cbb, &buf, &buf_len)); in test_cbb_basic() 340 ret = (buf_len == sizeof(kExpected) in test_cbb_basic() 341 && memcmp(buf, kExpected, buf_len) == 0); in test_cbb_basic() 356 size_t buf_len; in test_cbb_add_space() local 366 CHECK_GOTO(CBB_finish(&cbb, &buf, &buf_len)); in test_cbb_add_space() 368 ret |= (buf_len == sizeof(kExpected) in test_cbb_add_space() 369 && memcmp(buf, kExpected, buf_len) == 0); in test_cbb_add_space() 371 memset(buf, 0xa5, buf_len); in test_cbb_add_space() 372 CHECK(CBB_init_fixed(&cbb, buf, buf_len)); in test_cbb_add_space() [all …]
|
| /openbsd-src/lib/libcrypto/ecdh/ |
| H A D | ecdh.c | 155 int buf_len = 0; in ecdh_compute_key() local 195 if ((buf_len = ECDH_size(ecdh)) < BN_num_bytes(x)) { in ecdh_compute_key() 199 if ((buf = calloc(1, buf_len)) == NULL) { in ecdh_compute_key() 203 if (BN_bn2binpad(x, buf, buf_len) != buf_len) { in ecdh_compute_key() 209 *out_len = buf_len; in ecdh_compute_key() 211 buf_len = 0; in ecdh_compute_key() 219 freezero(buf, buf_len); in ecdh_compute_key()
|
| /openbsd-src/usr.bin/openssl/ |
| H A D | ecparam.c | 407 size_t buf_len = 0, tmp_len = 0; ecparam_main() local
|
| /openbsd-src/sys/dev/pci/drm/amd/display/modules/hdcp/ |
| H A D | hdcp_ddc.c | 155 uint32_t buf_len) in read() argument 171 while (buf_len > 0) { in read() 172 cur_size = MIN(buf_len, HDCP_MAX_AUX_TRANSACTION_SIZE); in read() 181 buf_len -= cur_size; in read() 195 (uint32_t)buf_len); in read_repeatedly() 204 uint32_t buf_len, in read_repeatedly() 211 while (buf_len > 0) { in read_repeatedly() 212 cur_size = MIN(buf_len, read_size); in read_repeatedly() 218 buf_len -= cur_size; in write() argument 228 uint32_t buf_len) in write() 194 read_repeatedly(struct mod_hdcp * hdcp,enum mod_hdcp_ddc_message_id msg_id,uint8_t * buf,uint32_t buf_len,uint8_t read_size) read_repeatedly() argument [all...] |
| /openbsd-src/gnu/llvm/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_common.cpp | 257 static uptr ReadProcessName(/*out*/ char *buf, uptr buf_len) { in ReadProcessName() argument 258 ReadLongProcessName(buf, buf_len); in ReadProcessName() 280 uptr ReadBinaryNameCached(/*out*/char *buf, uptr buf_len) { in ReadBinaryNameCached() argument 283 name_len = (name_len < buf_len - 1) ? name_len : buf_len - 1; in ReadBinaryNameCached() 284 if (buf_len == 0) in ReadBinaryNameCached() 291 uptr ReadBinaryDir(/*out*/ char *buf, uptr buf_len) { in ReadBinaryDir() argument 292 ReadBinaryNameCached(buf, buf_len); in ReadBinaryDir()
|
| /openbsd-src/regress/lib/libcrypto/ecdsa/ |
| H A D | ecdsatest.c | 99 unsigned int sig_len, degree, r_len, s_len, bn_len, buf_len; in test_builtin() local 230 buf_len = 2 * bn_len; in test_builtin() 231 if ((raw_buf = calloc(1, buf_len)) == NULL) in test_builtin() 236 raw_buf + buf_len - s_len); in test_builtin() 239 offset = raw_buf[10] % buf_len; in test_builtin()
|
| /openbsd-src/regress/lib/libcrypto/dh/ |
| H A D | dhtest.c | 95 int flags, buf_len, secret_len; in main() local 145 buf_len = DH_size(dh); in main() 146 if ((buf = malloc(buf_len)) == NULL) in main()
|
| /openbsd-src/usr.bin/signify/ |
| H A D | crypto_api.h | 17 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len)) argument
|
| /openbsd-src/gnu/llvm/llvm/lib/Support/BLAKE3/ |
| H A D | blake3.c | 22 self->buf_len = 0; in chunk_state_init() 33 self->buf_len = 0; in chunk_state_reset() 38 ((size_t)self->buf_len); in chunk_state_len() 43 size_t take = BLAKE3_BLOCK_LEN - ((size_t)self->buf_len); in chunk_state_fill_buf() 47 uint8_t *dest = self->buf + ((size_t)self->buf_len); in chunk_state_fill_buf() 49 self->buf_len += (uint8_t)take; in chunk_state_fill_buf() 121 if (self->buf_len > 0) { in chunk_state_update() 130 self->buf_len = 0; in chunk_state_update() 152 return make_output(self->cv, self->buf, self->buf_len, self->chunk_counter, in chunk_state_output()
|
| /openbsd-src/sbin/iked/ |
| H A D | crypto_api.h | 22 #define randombytes(buf, buf_len) arc4random_buf((buf), (buf_len)) argument
|
| /openbsd-src/regress/lib/libz/ |
| H A D | minigzip.c | 313 off_t buf_len; /* length of the input file */ in gz_compress_mmap() local 318 buf_len = sb.st_size; in gz_compress_mmap() 319 if (buf_len <= 0) return Z_ERRNO; in gz_compress_mmap() 322 buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); in gz_compress_mmap() 326 len = gzwrite(out, (char *)buf, (unsigned)buf_len); in gz_compress_mmap() 328 if (len != (int)buf_len) error(gzerror(out, &err)); in gz_compress_mmap() 330 munmap(buf, buf_len); in gz_compress_mmap()
|
| /openbsd-src/regress/lib/libcrypto/aead/ |
| H A D | aeadtest.c | 434 unsigned int *buf_len = NULL; in main() local 518 buf_len = &lengths[j]; in main() 529 *buf_len = strlcpy(buf, line + i, BUF_MAX); in main() 549 *buf_len = *buf_len + 1; in main() 581 *buf_len = *buf_len + 1; in main()
|
| /openbsd-src/usr.bin/rcs/ |
| H A D | rcsclean.c | 175 if (buf_len(b1) != buf_len(b2)) in rcsclean_file() 180 len = buf_len(b1); in rcsclean_file()
|
| /openbsd-src/lib/libcrypto/cms/ |
| H A D | cms_sd.c | 783 int buf_len = 0; in CMS_SignerInfo_sign() local 807 if ((buf_len = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &buf, in CMS_SignerInfo_sign() 809 buf_len = 0; in CMS_SignerInfo_sign() 812 if (!EVP_DigestSign(si->mctx, NULL, &sig_len, buf, buf_len)) in CMS_SignerInfo_sign() 816 if (!EVP_DigestSign(si->mctx, sig, &sig_len, buf, buf_len)) in CMS_SignerInfo_sign() 832 freezero(buf, buf_len); in CMS_SignerInfo_sign() 844 int buf_len = 0; in CMS_SignerInfo_verify() local 863 if ((buf_len = ASN1_item_i2d((ASN1_VALUE *)si->signedAttrs, &buf, in CMS_SignerInfo_verify() 865 buf_len = 0; in CMS_SignerInfo_verify() 870 buf, buf_len); in CMS_SignerInfo_verify() [all …]
|
| /openbsd-src/lib/libcrypto/asn1/ |
| H A D | a_object.c | 429 i2t_ASN1_OBJECT_internal(const ASN1_OBJECT *aobj, char *buf, int buf_len, int no_name) in i2t_ASN1_OBJECT_internal() argument 436 if (buf_len < 0) in i2t_ASN1_OBJECT_internal() 438 if (buf_len > 0) in i2t_ASN1_OBJECT_internal() 451 ret = strlcpy(buf, data, buf_len); in i2t_ASN1_OBJECT_internal() 460 i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *aobj) in i2t_ASN1_OBJECT() argument 462 return i2t_ASN1_OBJECT_internal(aobj, buf, buf_len, 0); in i2t_ASN1_OBJECT()
|
| /openbsd-src/sys/dev/ata/ |
| H A D | ata.c | 203 ata_perror(struct ata_drive_datas *drvp, int errno, char *buf, size_t buf_len) in ata_perror() argument 224 snprintf(buf, buf_len, "error not notified"); in ata_perror() 229 snprintf(buf + len, buf_len - len, "%s%s", sep, in ata_perror()
|