[openssl-users] Doubt about OpenSSL library initialization in an HTTP client application

silvioprog silvioprog at gmail.com
Sat Dec 3 16:18:14 UTC 2016


Hello all,

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:

  initialization
    SSL_library_init()
    SSL_load_error_strings()
    OpenSSL_add_all_algorithms()
    RAND_screen()

however, the execution of RAND_screen()  spends about 3 seconds.

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:

  initialization
    SSL_library_init()
    SSL_load_error_strings()
    OpenSSL_add_all_algorithms()
    //RAND_screen()
    unsigned char c;
    RAND_bytes(&c, 1);

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().

So I have a question: do I really need to call some function like RAND_* at
each application initialization?

This project has that same initialization:
https://github.com/svn2github/Ararat-Synapse/blob/master/trunk/ssl_openssl_lib.pas#L2001
.

--
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20161203/dd7026c6/attachment-0001.html>


More information about the openssl-users mailing list