Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 217) sorted by relevance

123456789

/openssl/crypto/rand/
H A Drand_pool.c43 if (pool->buffer == NULL) in ossl_rand_pool_new()
74 pool->buffer = (unsigned char *) buffer; in ossl_rand_pool_attach()
114 return pool->buffer; in ossl_rand_pool_buffer()
141 unsigned char *ret = pool->buffer; in ossl_rand_pool_detach()
142 pool->buffer = NULL; in ossl_rand_pool_detach()
153 pool->buffer = buffer; in ossl_rand_pool_reattach()
226 pool->buffer = p; in rand_pool_grow()
309 if (pool->buffer == NULL) { in ossl_rand_pool_add()
323 if (pool->alloc_len > pool->len && pool->buffer + pool->len == buffer) { in ossl_rand_pool_add()
336 memcpy(pool->buffer + pool->len, buffer, len); in ossl_rand_pool_add()
[all …]
/openssl/crypto/bio/
H A Dbio_print.c40 static int _dopr(char **sbuffer, char **buffer,
88 char **buffer, in _dopr() argument
319 if (buffer) in _dopr()
368 if (buffer == NULL) { in _dopr()
381 char **buffer, in fmtstr() argument
433 char **buffer, in fmtint() argument
563 char **buffer, in fmtfp() argument
842 if (buffer && *currlen == *maxlen) { in doapr_outch()
847 if (*buffer == NULL) { in doapr_outch()
862 *buffer = tmpbuf; in doapr_outch()
[all …]
/openssl/crypto/bn/
H A Dbn_s390x.c27 unsigned char *buffer; in s390x_mod_exp_hw() local
34 buffer = OPENSSL_zalloc(4 * size); in s390x_mod_exp_hw()
35 if (buffer == NULL) in s390x_mod_exp_hw()
37 me.inputdata = buffer; in s390x_mod_exp_hw()
39 me.outputdata = buffer + size; in s390x_mod_exp_hw()
41 me.b_key = buffer + 2 * size; in s390x_mod_exp_hw()
42 me.n_modulus = buffer + 3 * size; in s390x_mod_exp_hw()
67 OPENSSL_clear_free(buffer, 4 * size); in s390x_mod_exp_hw()
83 unsigned char *buffer, *part; in s390x_crt() local
99 if (buffer == NULL) in s390x_crt()
[all …]
/openssl/providers/implementations/rands/seeding/
H A Drand_win.c52 unsigned char *buffer; in ossl_pool_acquire_entropy() local
71 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
72 if (buffer != NULL) { in ossl_pool_acquire_entropy()
74 if (BCryptGenRandom(NULL, buffer, bytes_needed, in ossl_pool_acquire_entropy()
85 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
86 if (buffer != NULL) { in ossl_pool_acquire_entropy()
91 if (CryptGenRandom(hProvider, bytes_needed, buffer) != 0) in ossl_pool_acquire_entropy()
104 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
105 if (buffer != NULL) { in ossl_pool_acquire_entropy()
111 if (CryptGenRandom(hProvider, bytes_needed, buffer) != 0) in ossl_pool_acquire_entropy()
H A Drand_cpu_arm64.c36 unsigned char *buffer; in ossl_prov_acquire_entropy_from_cpu() local
40 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_prov_acquire_entropy_from_cpu()
42 if (buffer != NULL) { in ossl_prov_acquire_entropy_from_cpu()
43 if (get_hardware_random_value(buffer, bytes_needed) == bytes_needed) in ossl_prov_acquire_entropy_from_cpu()
H A Drand_vms.c356 uint32_t buffer[OSSL_NELEM(JPI_item_data_64bit) * 2 in data_collect_method() member
372 JPI_items_64bit, &data.buffer[total_elems]); in data_collect_method()
375 RMI_items_64bit, &data.buffer[total_elems]); in data_collect_method()
378 DVI_items, &data.buffer[total_elems]); in data_collect_method()
380 JPI_items, &data.buffer[total_elems]); in data_collect_method()
385 total_length = total_elems * sizeof(data.buffer[0]); in data_collect_method()
473 ossl_rand_pool_add(pool, (unsigned char *)data.buffer, total_length, in data_collect_method()
507 unsigned char buffer[256]; in get_entropy_method() local
516 bytes_needed > sizeof(buffer) ? sizeof(buffer) : bytes_needed; in get_entropy_method()
518 status = get_entropy_address(buffer, bytes_to_get); in get_entropy_method()
[all …]
H A Drand_cpu_x86.c41 unsigned char *buffer; in ossl_prov_acquire_entropy_from_cpu() local
45 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_prov_acquire_entropy_from_cpu()
47 if (buffer != NULL) { in ossl_prov_acquire_entropy_from_cpu()
48 if (get_hardware_random_value(buffer, bytes_needed) == bytes_needed) { in ossl_prov_acquire_entropy_from_cpu()
H A Drand_unix.c353 extern int getentropy(void *buffer, size_t length) __attribute__((weak)); in syscall_random()
370 int (*f)(void *buffer, size_t length); in syscall_random()
634 unsigned char *buffer; in ossl_pool_acquire_entropy()
641 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
642 bytes = syscall_random(buffer, bytes_needed); in ossl_pool_acquire_entropy()
660 unsigned char *buffer; in ossl_pool_acquire_entropy()
675 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
676 bytes = read(fd, buffer, bytes_needed); in ossl_pool_acquire_entropy()
713 unsigned char *buffer; in ossl_pool_acquire_entropy()
721 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
[all …]
H A Drand_vxworks.c111 unsigned char *buffer; in ossl_pool_acquire_entropy() local
113 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
119 result = randBytes(buffer, bytes_needed); in ossl_pool_acquire_entropy()
/openssl/doc/man3/
H A DBUF_MEM_new.pod11 #include <openssl/buffer.h>
26 The buffer library handles simple character arrays. Buffers are used for
29 BUF_MEM_new() allocates a new buffer of zero size.
31 BUF_MEM_new_ex() allocates a buffer with the specified flags.
35 BUF_MEM_free() frees up an already existing buffer. The data is zeroed
36 before freeing up in case the buffer contains sensitive data.
39 BUF_MEM_grow() changes the size of an already existing buffer to
40 B<len>. Any data already in the buffer is preserved if it increases in
51 BUF_MEM_new() returns the buffer or NULL on error.
H A DBIO_f_buffer.pod31 an internal buffer which is filled from the next BIO in the chain.
39 set the read, write or both read and write buffer sizes to B<size>. The initial
40 buffer size is DEFAULT_BUFFER_SIZE, currently 4096. Any attempt to reduce the
41 buffer size below DEFAULT_BUFFER_SIZE is ignored. Any buffered data is cleared
42 when the buffer is resized.
44 BIO_set_buffer_read_data() clears the read buffer and fills it with B<num>
45 bytes of B<buf>. If B<num> is larger than the current buffer size the buffer
54 result in an internal buffer, from which bytes are given back to the
64 doing so will force a full read of the size of the internal buffer of
67 Data is only written to the next BIO in the chain when the write buffer fills
[all …]
H A DBIO_s_bio.pod50 buffer is full.
53 determine the amount of pending data in the read or write buffer.
55 BIO_reset() clears any data in the write buffer.
71 BIO_get_write_buf_size() returns the size of the write buffer.
75 with write buffer sizes B<writebuf1> and B<writebuf2>. If either size is
87 amount of data requested, or the buffer size if it is less, if the
89 empty buffer. This can be used to determine how much data should be
92 meaningful rather than just a buffer size. After a successful read
171 buffer is full or the read buffer is drained. Then the application has to
172 flush the write buffer and/or fill the read buffer.
[all …]
H A DEVP_PKEY_get_size.pod28 also large enough for the output buffer of L<EVP_PKEY_sign(3)>,
34 contents of the target buffer may be smaller. It is therefore crucial
55 Most functions that have an output buffer and are mentioned with
57 buffer and still pass a pointer to an integer and get the exact size
60 exact buffer size, then allocate the buffer in between, and call that
63 buffer size, but may be useful in cases where it's desirable to know
/openssl/test/
H A Dsimpledynamic.c66 static char buffer[255]; in sd_error() local
68 buffer[0] = '\0'; in sd_error()
70 buffer, sizeof(buffer), NULL); in sd_error()
71 return buffer; in sd_error()
H A Dpunycode_test.c156 unsigned int buffer[50]; in test_punycode() local
157 unsigned int bsize = OSSL_NELEM(buffer); in test_punycode()
161 buffer, &bsize))) in test_punycode()
166 if (!TEST_mem_eq(buffer, bsize * sizeof(*buffer), in test_punycode()
/openssl/crypto/ec/curve448/
H A Df_generic.c24 dword_t buffer = 0; in gf_serialize() local
35 buffer |= ((dword_t) red->limb[LIMBPERM(j)]) << fill; in gf_serialize()
39 serial[i] = (uint8_t)buffer; in gf_serialize()
41 buffer >>= 8; in gf_serialize()
70 dword_t buffer = 0; in gf_deserialize() local
83 buffer |= ((dword_t) sj) << fill; in gf_deserialize()
88 ((i < NLIMBS - 1) ? buffer & LIMB_MASK(LIMBPERM(i)) : buffer); in gf_deserialize()
90 buffer >>= LIMB_PLACE_VALUE(LIMBPERM(i)); in gf_deserialize()
96 return succ & word_is_zero((word_t)buffer) & ~word_is_zero((word_t)scarry); in gf_deserialize()
/openssl/crypto/
H A Dprovider_conf.c87 char buffer[512]; in provider_conf_params_internal() local
112 OPENSSL_strlcpy(buffer, name, sizeof(buffer)); in provider_conf_params_internal()
113 OPENSSL_strlcat(buffer, ".", sizeof(buffer)); in provider_conf_params_internal()
114 buffer_len = strlen(buffer); in provider_conf_params_internal()
120 if (buffer_len + strlen(sectconf->name) >= sizeof(buffer)) { in provider_conf_params_internal()
124 buffer[buffer_len] = '\0'; in provider_conf_params_internal()
125 OPENSSL_strlcat(buffer, sectconf->name, sizeof(buffer)); in provider_conf_params_internal()
126 rc = provider_conf_params_internal(prov, provinfo, buffer, in provider_conf_params_internal()
/openssl/include/crypto/
H A Drand_pool.h72 unsigned char *buffer; /* points to the beginning of the random pool */ member
87 RAND_POOL *ossl_rand_pool_attach(const unsigned char *buffer, size_t len,
93 void ossl_rand_pool_reattach(RAND_POOL *pool, unsigned char *buffer);
105 const unsigned char *buffer, size_t len, size_t entropy);
/openssl/doc/internal/man3/
H A Dossl_rand_get_entropy.pod40 stored in a buffer which contains at least I<min_len> and at most I<max_len>
41 bytes. The buffer address is stored in I<*pout> and the buffer length is
50 ossl_rand_get_entropy(). The entropy buffer is pointed to by I<buf>
54 ossl_rand_get_user_entropy(). The entropy buffer is pointed to by I<buf>
61 The output is stored in a buffer which contains at least I<min_len> and at
62 most I<max_len> bytes. The buffer address is stored in I<*pout> and the
63 buffer length returned to the caller.
71 ossl_rand_get_nonce() or ossl_rand_get_user_nonce(). The nonce buffer
/openssl/demos/digest/
H A DEVP_MD_stdin.c43 unsigned char buffer[512]; in demonstrate_digest() local
96 while ((ii = BIO_read(input, buffer, sizeof(buffer))) > 0) { in demonstrate_digest()
97 if (EVP_DigestUpdate(digest_context, buffer, ii) != 1) { in demonstrate_digest()
H A DBIO_f_md.c44 unsigned char buffer[512]; in main() local
98 while (BIO_read(reading, buffer, sizeof(buffer)) > 0) in main()
/openssl/test/testutil/
H A Dtestutil_init.c27 char buffer[256], *hex; in internal_trace_cb() local
36 BIO_snprintf(buffer, sizeof(buffer), "TRACE[%s]:%s: ", in internal_trace_cb()
39 BIO_set_prefix(trace_data->bio, buffer); in internal_trace_cb()
/openssl/crypto/dso/
H A Ddso_dlfcn.c367 char *buffer, *member; in dladdr() local
375 if ((buffer = OPENSSL_malloc(buffer_sz)) != NULL) { in dladdr()
376 OPENSSL_strlcpy(buffer, this_ldi->ldinfo_filename, buffer_sz); in dladdr()
383 OPENSSL_strlcat(buffer, "(", buffer_sz); in dladdr()
384 OPENSSL_strlcat(buffer, member, buffer_sz); in dladdr()
385 OPENSSL_strlcat(buffer, ")", buffer_sz); in dladdr()
387 dl->dli_fname = buffer; in dladdr()
/openssl/crypto/buffer/
H A Dbuild.info2 SOURCE[../../libcrypto]=buffer.c buf_err.c
3 SOURCE[../../providers/libfips.a]=buffer.c
/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()
120 *buffer = NULL; in pvk_set_membuf()
124 if ((*buffer = OPENSSL_malloc(1)) == NULL) in pvk_set_membuf()
127 if (!OSSL_PARAM_get_octet_string(p, (void **)buffer, 0, buflen)) in pvk_set_membuf()

Completed in 33 milliseconds

123456789