Lines Matching refs:buffer
41 pool->buffer = OPENSSL_secure_zalloc(pool->alloc_len); in ossl_rand_pool_new()
43 pool->buffer = OPENSSL_zalloc(pool->alloc_len); in ossl_rand_pool_new()
45 if (pool->buffer == NULL) { in ossl_rand_pool_new()
65 RAND_POOL *ossl_rand_pool_attach(const unsigned char *buffer, size_t len, in ossl_rand_pool_attach() argument
80 pool->buffer = (unsigned char *) buffer; in ossl_rand_pool_attach()
107 OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len); in ossl_rand_pool_free()
109 OPENSSL_clear_free(pool->buffer, pool->alloc_len); in ossl_rand_pool_free()
120 return pool->buffer; in ossl_rand_pool_buffer()
147 unsigned char *ret = pool->buffer; in ossl_rand_pool_detach()
148 pool->buffer = NULL; in ossl_rand_pool_detach()
157 void ossl_rand_pool_reattach(RAND_POOL *pool, unsigned char *buffer) in ossl_rand_pool_reattach() argument
159 pool->buffer = buffer; in ossl_rand_pool_reattach()
160 OPENSSL_cleanse(pool->buffer, pool->len); in ossl_rand_pool_reattach()
229 memcpy(p, pool->buffer, pool->len); in rand_pool_grow()
231 OPENSSL_secure_clear_free(pool->buffer, pool->alloc_len); in rand_pool_grow()
233 OPENSSL_clear_free(pool->buffer, pool->alloc_len); in rand_pool_grow()
234 pool->buffer = p; in rand_pool_grow()
306 const unsigned char *buffer, size_t len, size_t entropy) in ossl_rand_pool_add() argument
313 if (pool->buffer == NULL) { in ossl_rand_pool_add()
327 if (pool->alloc_len > pool->len && pool->buffer + pool->len == buffer) { in ossl_rand_pool_add()
340 memcpy(pool->buffer + pool->len, buffer, len); in ossl_rand_pool_add()
370 if (pool->buffer == NULL) { in ossl_rand_pool_add_begin()
387 return pool->buffer + pool->len; in ossl_rand_pool_add_begin()