RAND_bytes() thread safety

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RAND_bytes() thread safety

Rahul Godbole
Hi

Is OpenSSL function RAND_bytes () thread safe?

Thanks
Rahul

Reply | Threaded
Open this post in threaded view
|

Re: RAND_bytes() thread safety

Matt Caswell-2


On 14/11/2020 11:00, Rahul Godbole wrote:
> Is OpenSSL function RAND_bytes () thread safe?

Short answer: Yes

Longer answer: Yes assuming that:
- you are using >= OpenSSL 1.1.0
or
- you are using OpenSSL 1.0.2 or below and you have set up the locking
callbacks

AND

- You have not compiled OpenSSL with "no-threads"

Matt