<div dir="ltr">Hello all,<div><br></div><div>I'm trying to speed up the initialization of a legacy HTTP client application. Debugging that code, I found the following functions being called each application startup:</div><div><br></div><div><font size="1" face="monospace, monospace">  initialization</font></div><div><font size="1" face="monospace, monospace">    SSL_library_init()<br></font></div><div><div><font size="1" face="monospace, monospace">    SSL_load_error_strings()</font></div><div><font size="1" face="monospace, monospace">    OpenSSL_add_all_algorithms()</font></div><div><font size="1" face="monospace, monospace">    RAND_screen()</font></div><div><div><br></div><div>however, the execution of RAND_screen()  spends about 3 seconds.</div><div><br></div><div>The first idea was commenting this line, but I don't know if I really can do that. After some "googling" I found someone doing something like this:</div><div><br></div><div><div><font size="1" face="monospace, monospace">  initialization</font></div><div><font size="1" face="monospace, monospace">    SSL_library_init()<br></font></div><div><div><font size="1" face="monospace, monospace">    SSL_load_error_strings()</font></div><div><font size="1" face="monospace, monospace">    OpenSSL_add_all_algorithms()</font></div><div><font size="1" face="monospace, monospace">    //RAND_screen()</font></div></div></div><div><font size="1" face="monospace, monospace"><div>    unsigned char c;</div><div>    RAND_bytes(&c, 1);</div></font></div><div><br></div><div>anyway I don't know if it is really necessary, so I just commented RAND_screen() line and without add this call to RAND_bytes().</div><div><br></div><div>So I have a question: do I really need to call some function like RAND_* at each application initialization?</div><div><br></div><div>This project has that same initialization: <a href="https://github.com/svn2github/Ararat-Synapse/blob/master/trunk/ssl_openssl_lib.pas#L2001">https://github.com/svn2github/Ararat-Synapse/blob/master/trunk/ssl_openssl_lib.pas#L2001</a> .</div><div><br></div>--<br><div class="gmail_signature"><div dir="ltr"><div>Silvio Clécio</div></div></div>
</div></div></div>