git: 1f7edad4ceda - main - security/libssh2: Fix build with libressl-3.5

From: Felix Palmen <zirias_at_FreeBSD.org>
Date: Fri, 04 Nov 2022 11:13:37 UTC
The branch main has been updated by zirias:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1f7edad4ceda225d95f13ea187316b3d3b05f8e4

commit 1f7edad4ceda225d95f13ea187316b3d3b05f8e4
Author:     Felix Palmen <zirias@FreeBSD.org>
AuthorDate: 2022-10-17 08:31:18 +0000
Commit:     Felix Palmen <zirias@FreeBSD.org>
CommitDate: 2022-11-04 11:13:13 +0000

    security/libssh2: Fix build with libressl-3.5
    
    Approved by:            sbz (maintainer, timeout), tcberner (mentor)
    Differential Revision:  https://reviews.freebsd.org/D37045
---
 security/libssh2/files/patch-src_openssl.c | 12 ++++++++++++
 security/libssh2/files/patch-src_openssl.h | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/security/libssh2/files/patch-src_openssl.c b/security/libssh2/files/patch-src_openssl.c
new file mode 100644
index 000000000000..3e167ab08da8
--- /dev/null
+++ b/security/libssh2/files/patch-src_openssl.c
@@ -0,0 +1,12 @@
+--- src/openssl.c.orig	2022-10-17 08:20:24 UTC
++++ src/openssl.c
+@@ -653,8 +653,7 @@ _libssh2_EVP_aes_256_ctr(void)
+ 
+ void _libssh2_openssl_crypto_init(void)
+ {
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
+-    !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ #ifndef OPENSSL_NO_ENGINE
+     ENGINE_load_builtin_engines();
+     ENGINE_register_all_complete();
diff --git a/security/libssh2/files/patch-src_openssl.h b/security/libssh2/files/patch-src_openssl.h
new file mode 100644
index 000000000000..0bbca531c2c7
--- /dev/null
+++ b/security/libssh2/files/patch-src_openssl.h
@@ -0,0 +1,12 @@
+--- src/openssl.h.orig	2022-10-17 08:18:24 UTC
++++ src/openssl.h
+@@ -57,8 +57,7 @@
+ #include <openssl/pem.h>
+ #include <openssl/rand.h>
+ 
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \
+-    !defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+ # define HAVE_OPAQUE_STRUCTS 1
+ #endif
+