Also see "Library Initialization" on the old OpenSSL wiki at
<https://wiki.openssl.org/index.php/Library_Initialization>.  The
article was written about 10 years ago, back when OpenSSL 1.0.2 was
competing with OpenSSL 2.x and 3.x, and each had different ways to
initialize the library.  I am not sure what's happening today.

If I were writing code that needed to initialize OpenSSL 3.x nowadays,
I would probably use this (from the wiki page):

    #include <openssl/opensslv.h>
    ...

    #if OPENSSL_VERSION_NUMBER < 0x10100000L
    SSL_library_init();
    #else
    OPENSSL_init_ssl(0, NULL);
    #endif

But I am not sure if that is a valid pattern nowadays.

Jeff



Reply via email to