patch-src_ssl_c 969 B

12345678910111213141516171819202122
  1. $OpenBSD: patch-src_ssl_c,v 1.5 2017/01/09 15:40:30 gsoares Exp $
  2. --- src/ssl.c.orig Mon Jan 9 10:52:07 2017
  3. +++ src/ssl.c Mon Jan 9 10:52:47 2017
  4. @@ -50,7 +50,7 @@ NOEXPORT int add_rand_file(GLOBAL_OPTIONS *, const cha
  5. int index_cli, index_opt, index_redirect, index_addr;
  6. int ssl_init(void) { /* init TLS before parsing configuration file */
  7. -#if OPENSSL_VERSION_NUMBER>=0x10100000L
  8. +#if OPENSSL_VERSION_NUMBER>=0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
  9. OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS |
  10. OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  11. #else
  12. @@ -83,7 +83,7 @@ int ssl_init(void) { /* init TLS before parsing config
  13. }
  14. #ifndef OPENSSL_NO_DH
  15. -#if OPENSSL_VERSION_NUMBER<0x10100000L
  16. +#if OPENSSL_VERSION_NUMBER<0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
  17. /* this is needed for dhparam.c generated with OpenSSL >= 1.1.0
  18. * to be linked against the older versions */
  19. int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) {