|
|
@@ -33,6 +33,21 @@ OPENSSL_EXPORT int RAND_bytes(uint8_t *buf, size_t len); |
|
|
|
OPENSSL_EXPORT void RAND_cleanup(void); |
|
|
|
|
|
|
|
|
|
|
|
/* Obscure functions. */ |
|
|
|
|
|
|
|
#if !defined(OPENSSL_WINDOWS) |
|
|
|
/* RAND_set_urandom_fd causes the module to use a copy of |fd| for system |
|
|
|
* randomness rather opening /dev/urandom internally. The caller retains |
|
|
|
* ownership of |fd| and is at liberty to close it at any time. This is useful |
|
|
|
* if, due to a sandbox, /dev/urandom isn't available. If used, it must be |
|
|
|
* called before |RAND_bytes| is called in the current address space. |
|
|
|
* |
|
|
|
* |RAND_set_urandom_fd| does not buffer any entropy, so it is safe to call |
|
|
|
* |fork| between |RAND_set_urandom_fd| and the first call to |RAND_bytes|. */ |
|
|
|
OPENSSL_EXPORT void RAND_set_urandom_fd(int fd); |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
/* Deprecated functions */ |
|
|
|
|
|
|
|
/* RAND_pseudo_bytes is a wrapper around |RAND_bytes|. */ |
|
|
|