libressl-RAND_set_rand_method(3)

libressl-RAND_set_rand_method3

Select rand method

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/rand.h>

int

RAND_set_rand_method(const RAND_METHOD *meth);

const RAND_METHOD *

RAND_get_rand_method(void);

RAND_METHOD *

RAND_SSLeay(void);

Overview

These functions used to allow for the random number generator functions to be replaced by arbitrary code.

They are kept for ABI compatibility but are no longer functional, and should not be used in new programs.

Return values

RAND_set_rand_method() always returns 1. RAND_get_rand_method() and RAND_SSLeay() always return NULL.

History

RAND_set_rand_method(), RAND_get_rand_method(), and RAND_SSLeay() first appeared in SSLeay 0.9.1 and have been available since OpenBSD 2.6.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.