Home
last modified time | relevance | path

Searched refs:pool (Results 1 – 25 of 34) sorted by relevance

12

/openssl/crypto/rand/
H A Drand_pool.c35 if (pool->alloc_len > pool->max_len) in ossl_rand_pool_new()
36 pool->alloc_len = pool->max_len; in ossl_rand_pool_new()
79 pool->min_len = pool->max_len = pool->alloc_len = pool->len; in ossl_rand_pool_attach()
179 if (pool->len < pool->min_len) in ossl_rand_pool_entropy_available()
206 if (pool->attached || len > pool->max_len - pool->len) { in rand_pool_grow()
221 memcpy(p, pool->buffer, pool->len); in rand_pool_grow()
260 if (pool->len < pool->min_len && in ossl_rand_pool_bytes_needed()
279 pool->max_len = pool->len = 0; in ossl_rand_pool_bytes_needed()
289 return pool->max_len - pool->len; in ossl_rand_pool_bytes_remaining()
323 if (pool->alloc_len > pool->len && pool->buffer + pool->len == buffer) { in ossl_rand_pool_add()
[all …]
H A Dprov_seed.c24 RAND_POOL *pool; in ossl_rand_get_entropy() local
27 if (pool == NULL) { in ossl_rand_get_entropy()
36 ret = ossl_rand_pool_length(pool); in ossl_rand_get_entropy()
37 *pout = ossl_rand_pool_detach(pool); in ossl_rand_get_entropy()
40 ossl_rand_pool_free(pool); in ossl_rand_get_entropy()
80 RAND_POOL *pool; in ossl_rand_get_nonce() local
83 if (pool == NULL) { in ossl_rand_get_nonce()
88 if (!ossl_pool_add_nonce_data(pool)) in ossl_rand_get_nonce()
93 ret = ossl_rand_pool_length(pool); in ossl_rand_get_nonce()
94 *pout = ossl_rand_pool_detach(pool); in ossl_rand_get_nonce()
[all …]
H A Drand_lib.c140 RAND_POOL *pool = ossl_rand_pool_new(RAND_DRBG_STRENGTH, 1, in RAND_poll() local
144 if (pool == NULL) in RAND_poll()
147 if (ossl_pool_acquire_entropy(pool) == 0) in RAND_poll()
151 || meth->add(ossl_rand_pool_buffer(pool), in RAND_poll()
152 ossl_rand_pool_length(pool), in RAND_poll()
153 (ossl_rand_pool_entropy(pool) / 8.0)) == 0) in RAND_poll()
158 ossl_rand_pool_free(pool); in RAND_poll()
/openssl/providers/implementations/rands/seeding/
H A Drand_win.c47 size_t ossl_pool_acquire_entropy(RAND_POOL *pool) in ossl_pool_acquire_entropy() argument
58 entropy_available = ossl_prov_acquire_entropy_from_tsc(pool); in ossl_pool_acquire_entropy()
64 entropy_available = ossl_prov_acquire_entropy_from_cpu(pool); in ossl_pool_acquire_entropy()
71 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
78 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
85 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
97 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
104 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
116 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
123 return ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
[all …]
H A Drand_unix.c139 size_t ossl_pool_acquire_entropy(RAND_POOL *pool) in ossl_pool_acquire_entropy() argument
177 ossl_rand_pool_add(pool, arg, &v, sizeof(v), 2); in ossl_pool_acquire_entropy()
179 return ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
622 size_t ossl_pool_acquire_entropy(RAND_POOL *pool) in ossl_pool_acquire_entropy() argument
625 return ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
644 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
652 entropy_available = ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
689 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); in ossl_pool_acquire_entropy()
727 ossl_rand_pool_add_end(pool, bytes, 8 * bytes); in ossl_pool_acquire_entropy()
736 return ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
[all …]
H A Drand_vxworks.c79 int ossl_pool_add_nonce_data(RAND_POOL *pool) in ossl_pool_add_nonce_data() argument
98 return ossl_rand_pool_add(pool, (unsigned char *)&data, sizeof(data), 0); in ossl_pool_add_nonce_data()
101 size_t ossl_pool_acquire_entropy(RAND_POOL *pool) in ossl_pool_acquire_entropy() argument
107 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in ossl_pool_acquire_entropy()
113 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_pool_acquire_entropy()
121 ossl_rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); in ossl_pool_acquire_entropy()
138 return ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
144 return ossl_rand_pool_entropy_available(pool); in ossl_pool_acquire_entropy()
H A Drand_cpu_arm64.c33 size_t ossl_prov_acquire_entropy_from_cpu(RAND_POOL *pool) in ossl_prov_acquire_entropy_from_cpu() argument
38 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in ossl_prov_acquire_entropy_from_cpu()
40 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_prov_acquire_entropy_from_cpu()
44 ossl_rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); in ossl_prov_acquire_entropy_from_cpu()
46 ossl_rand_pool_add_end(pool, 0, 0); in ossl_prov_acquire_entropy_from_cpu()
50 return ossl_rand_pool_entropy_available(pool); in ossl_prov_acquire_entropy_from_cpu()
H A Drand_cpu_x86.c38 size_t ossl_prov_acquire_entropy_from_cpu(RAND_POOL *pool) in ossl_prov_acquire_entropy_from_cpu() argument
43 bytes_needed = ossl_rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); in ossl_prov_acquire_entropy_from_cpu()
45 buffer = ossl_rand_pool_add_begin(pool, bytes_needed); in ossl_prov_acquire_entropy_from_cpu()
49 ossl_rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed); in ossl_prov_acquire_entropy_from_cpu()
51 ossl_rand_pool_add_end(pool, 0, 0); in ossl_prov_acquire_entropy_from_cpu()
56 return ossl_rand_pool_entropy_available(pool); in ossl_prov_acquire_entropy_from_cpu()
H A Drand_vms.c345 size_t data_collect_method(RAND_POOL *pool) in data_collect_method() argument
367 size_t bytes_remaining = ossl_rand_pool_bytes_remaining(pool); in data_collect_method()
473 ossl_rand_pool_add(pool, (unsigned char *)data.buffer, total_length, in data_collect_method()
475 return ossl_rand_pool_entropy_available(pool); in data_collect_method()
501 size_t get_entropy_method(RAND_POOL *pool) in get_entropy_method() argument
512 for (bytes_needed = ossl_rand_pool_bytes_needed(pool, 1); in get_entropy_method()
534 return ossl_rand_pool_entropy_available(pool); in get_entropy_method()
544 size_t ossl_pool_acquire_entropy(RAND_POOL *pool) in ossl_pool_acquire_entropy() argument
547 return get_entropy_method(pool); in ossl_pool_acquire_entropy()
548 return data_collect_method(pool); in ossl_pool_acquire_entropy()
[all …]
H A Drand_tsc.c33 size_t ossl_prov_acquire_entropy_from_tsc(RAND_POOL *pool) in ossl_prov_acquire_entropy_from_tsc() argument
41 ossl_rand_pool_add(pool, &c, 1, 4); in ossl_prov_acquire_entropy_from_tsc()
44 return ossl_rand_pool_entropy_available(pool); in ossl_prov_acquire_entropy_from_tsc()
/openssl/crypto/async/
H A Dasync.c102 async_pool *pool; in async_get_pool_job() local
105 if (pool == NULL) { in async_get_pool_job()
118 if ((pool->max_size != 0) && (pool->curr_size >= pool->max_size)) in async_get_pool_job()
134 async_pool *pool; in async_release_job() local
137 if (pool == NULL) { in async_release_job()
319 if (pool == NULL || pool->jobs == NULL) in async_empty_pool()
350 async_pool *pool; in ASYNC_init_thread() local
364 pool = OPENSSL_zalloc(sizeof(*pool)); in ASYNC_init_thread()
365 if (pool == NULL) in ASYNC_init_thread()
403 OPENSSL_free(pool); in ASYNC_init_thread()
[all …]
/openssl/include/crypto/
H A Drand_pool.h89 void ossl_rand_pool_free(RAND_POOL *pool);
91 const unsigned char *ossl_rand_pool_buffer(RAND_POOL *pool);
92 unsigned char *ossl_rand_pool_detach(RAND_POOL *pool);
93 void ossl_rand_pool_reattach(RAND_POOL *pool, unsigned char *buffer);
95 size_t ossl_rand_pool_entropy(RAND_POOL *pool);
96 size_t ossl_rand_pool_length(RAND_POOL *pool);
98 size_t ossl_rand_pool_entropy_available(RAND_POOL *pool);
99 size_t ossl_rand_pool_entropy_needed(RAND_POOL *pool);
102 size_t ossl_rand_pool_bytes_remaining(RAND_POOL *pool);
104 int ossl_rand_pool_add(RAND_POOL *pool,
[all …]
H A Drand.h135 size_t ossl_pool_acquire_entropy(RAND_POOL *pool);
136 int ossl_pool_add_nonce_data(RAND_POOL *pool);
/openssl/providers/implementations/rands/
H A Dseed_src_jitter.c72 ossl_rand_pool_add_end(pool, 0, 0); in ossl_prov_acquire_entropy_from_jitter()
77 return ossl_rand_pool_entropy_available(pool); in ossl_prov_acquire_entropy_from_jitter()
178 RAND_POOL *pool; in jitter_generate() local
188 if (pool == NULL) { in jitter_generate()
197 memcpy(out, ossl_rand_pool_buffer(pool), ossl_rand_pool_length(pool)); in jitter_generate()
199 ossl_rand_pool_free(pool); in jitter_generate()
267 RAND_POOL *pool; in jitter_get_seed() local
271 if (pool == NULL) { in jitter_get_seed()
280 ret = ossl_rand_pool_length(pool); in jitter_get_seed()
281 *pout = ossl_rand_pool_detach(pool); in jitter_get_seed()
[all …]
H A Dseed_src.c96 RAND_POOL *pool; in seed_src_generate() local
106 if (pool == NULL) { in seed_src_generate()
112 entropy_available = ossl_pool_acquire_entropy(pool); in seed_src_generate()
115 memcpy(out, ossl_rand_pool_buffer(pool), ossl_rand_pool_length(pool)); in seed_src_generate()
117 ossl_rand_pool_free(pool); in seed_src_generate()
183 RAND_POOL *pool; in seed_get_seed() local
186 if (pool == NULL) { in seed_get_seed()
192 entropy_available = ossl_pool_acquire_entropy(pool); in seed_get_seed()
195 ret = ossl_rand_pool_length(pool); in seed_get_seed()
196 *pout = ossl_rand_pool_detach(pool); in seed_get_seed()
[all …]
/openssl/doc/designs/
H A Dthread-api.md13 scheduled on the internal thread pool.
16 the thread pool functionality, known as the “default model”. More models
19 A thread pool is managed on a per-`OSSL_LIB_CTX` basis.
32 * Set the maximum number of threads to be used by the thread pool.
35 * threads and existing threads in the thread pool will be torn down.
67 /* Is thread pool functionality supported at all? */
85 A build option `thread-pool`/`no-thread-pool` will be introduced which allows
86 thread pool functionality to be compiled out. `no-thread-pool` implies
87 `no-default-thread-pool`.
89 A build option `default-thread-pool`/`no-default-thread-pool` will be introduced
[all …]
/openssl/crypto/bn/
H A Dbn_ctx.c65 BN_POOL pool; member
85 BN_POOL_ITEM *item = ctx->pool.head; in ctxdbg()
125 BN_POOL_init(&ret->pool); in BN_CTX_new_ex()
160 BN_POOL_ITEM *pool = ctx->pool.head; in BN_CTX_free() local
163 ctx->stack.size, ctx->pool.size); in BN_CTX_free()
165 while (pool) { in BN_CTX_free()
168 BIO_printf(trc_out, "%02x ", pool->vals[loop++].dmax); in BN_CTX_free()
169 pool = pool->next; in BN_CTX_free()
175 BN_POOL_finish(&ctx->pool); in BN_CTX_free()
204 BN_POOL_release(&ctx->pool, ctx->used - fp); in BN_CTX_end()
[all …]
/openssl/providers/implementations/include/prov/
H A Dseeding.h14 size_t ossl_prov_acquire_entropy_from_tsc(RAND_POOL *pool);
15 size_t ossl_prov_acquire_entropy_from_cpu(RAND_POOL *pool);
/openssl/doc/man3/
H A DCRYPTO_THREAD_run_once.pod152 thread pool. If the argument is 0, thread pooling is disabled. OpenSSL will
153 not create any threads and existing threads in the thread pool will be torn
161 OSSL_get_thread_support_flags() determines what thread pool functionality
164 thread pool functionality is available, and
165 B<OSSL_THREAD_SUPPORT_FLAG_DEFAULT_SPAWN> indicates that the default thread pool
166 model is available. The default thread pool model is currently the only model
167 available, therefore both of these flags must be set for thread pool
186 to be used by the thread pool. If thread pooling is disabled or not available,
H A DASYNC_start_job.pod46 are held in a pool until they are needed, at which point they are removed from
47 the pool, used, and then returned to the pool when the job completes. If the
57 the pool. If I<max_size> is set to 0 then no upper limit is set. When an
58 B<ASYNC_JOB> is needed but there are none available in the pool already then one
60 the pool does not exceed I<max_size>. When the pool is first initialised
62 is not called before the pool is first used then it will be called automatically
84 There are no jobs currently available in the pool. This call can be retried
H A DOPENSSL_fork_prepare.pod28 the entropy pool used to generate random numbers (and therefore encryption
H A DBN_CTX_new.pod45 locking is performed, and the internal pool allocator will not properly handle
/openssl/.github/workflows/
H A Drun-checker-ci.yml36 no-thread-pool,
37 no-default-thread-pool,
/openssl/crypto/thread/
H A Dbuild.info7 IF[{- !$disabled{'thread-pool'} -}]
/openssl/doc/designs/quic-design/
H A Dquic-fifm.md281 self-contained memory pool handing out `QUIC_TXPIM_PKT` structures. Each
360 * Allocates a new QUIC_TXPIM_PKT structure from the pool. Returns NULL on
367 * Releases the TXPIM packet, returning it to the pool.
416 `QUIC_TXPIM_PKT` is returned to the free pool once any of these callbacks occur;

Completed in 37 milliseconds

12