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:28:18 +00:00
parent 6008896554
commit f92b4d81d4
No known key found for this signature in database
GPG key ID: EC6F86EE9CD840B5

View file

@ -358,13 +358,13 @@ rb_init_ssl(void)
{ {
char libratbox_data[] = "libratbox data"; char libratbox_data[] = "libratbox data";
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
/* /*
* OpenSSL 1.1.0 and above automatically initialises itself with sane defaults * 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_library_init();
SSL_load_error_strings(); SSL_load_error_strings();
#endif #endif
libratbox_index = SSL_get_ex_new_index(0, libratbox_data, NULL, NULL, NULL); libratbox_index = SSL_get_ex_new_index(0, libratbox_data, NULL, NULL, NULL);