You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
757 B

  1. --- a/ibrcommon/ssl/TLSStream.cpp
  2. +++ b/ibrcommon/ssl/TLSStream.cpp
  3. @@ -259,16 +259,22 @@ namespace ibrcommon
  4. /* openssl initialization */
  5. /* the if block is needed because SSL_library_init() is not reentrant */
  6. if(!_SSL_initialized){
  7. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  8. SSL_load_error_strings();
  9. SSL_library_init();
  10. ERR_load_BIO_strings();
  11. ERR_load_SSL_strings();
  12. +#endif
  13. _SSL_initialized = true;
  14. }
  15. /* create ssl context and throw exception if it fails */
  16. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  17. _ssl_ctx = SSL_CTX_new(TLSv1_method());
  18. +#else
  19. + _ssl_ctx = SSL_CTX_new(TLS_method());
  20. +#endif
  21. if(!_ssl_ctx){
  22. char err_buf[ERR_BUF_SIZE];
  23. ERR_error_string_n(ERR_get_error(), err_buf, ERR_BUF_SIZE);