OpenSSL: Initialise if LibreSSL

LibreSSL's definition of OPENSSL_VERSION_NUMBER bites us in the ass,
*again*.
This commit is contained in:
Aaron Jones 2016-09-01 19:29:47 +00:00
parent 572c2d4b05
commit 94f114641c
No known key found for this signature in database
GPG key ID: EC6F86EE9CD840B5

View file

@ -357,13 +357,13 @@ rb_init_ssl(void)
{
char librb_data[] = "librb data";
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
/*
* OpenSSL 1.1.0 and above automatically initialises itself with sane defaults
*/
#if defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x10100000L)
SSL_library_init();
SSL_load_error_strings();
#endif
#endif
librb_index = SSL_get_ex_new_index(0, librb_data, NULL, NULL, NULL);