Fix build if libressl is used instead of openssl

Submitted by:	Walter Schwarzenfeld
This commit is contained in:
Chris Rees 2018-03-01 18:56:40 +00:00
parent 76d701a265
commit 93bf29dca6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=463347

View File

@ -0,0 +1,23 @@
--- libtransmission/crypto-utils-openssl.c.orig 2018-03-01 00:44:45 UTC
+++ libtransmission/crypto-utils-openssl.c
@@ -147,7 +147,7 @@ tr_sha1_final (tr_sha1_ctx_t handle,
****
***/
-#if OPENSSL_VERSION_NUMBER < 0x0090802fL
+#if OPENSSL_VERSION_NUMBER < 0x0090802fL || defined(LIBRESSL_VERSION_NUMBER)
static EVP_CIPHER_CTX *
openssl_evp_cipher_context_new (void)
@@ -230,7 +230,7 @@ tr_rc4_process (tr_rc4_ctx_t handle,
****
***/
-#if OPENSSL_VERSION_NUMBER < 0x10100000
+#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
static inline int
DH_set0_pqg (DH * dh,
BIGNUM * p,