Which version of OpenSSL are you using? 1.0.2 and 1.1.0 have a bad random number generator and must be explicitly seeded. 1.1.1 has a good random number generator and auto-seeds.