cb9df3
diff -ru cmake-3.7.2.orig/Utilities/cmcurl/lib/vtls/openssl.c cmake-3.7.2/Utilities/cmcurl/lib/vtls/openssl.c
cb9df3
--- cmake-3.7.2.orig/Utilities/cmcurl/lib/vtls/openssl.c        2017-01-13 15:05:42.000000000 +0100
cb9df3
+++ cmake-3.7.2/Utilities/cmcurl/lib/vtls/openssl.c     2022-11-04 12:08:55.736358938 +0100
cb9df3
@@ -108,8 +108,7 @@
cb9df3
 #define OPENSSL_NO_SSL2
cb9df3
 #endif
cb9df3
cb9df3
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && /* OpenSSL 1.1.0+ */ \
cb9df3
-  !defined(LIBRESSL_VERSION_NUMBER)
cb9df3
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) /* OpenSSL 1.1.0+ */
cb9df3
 #define SSLeay_add_ssl_algorithms() SSL_library_init()
cb9df3
 #define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
cb9df3
 #define HAVE_X509_GET0_EXTENSIONS 1 /* added in 1.1.0 -pre1 */
cb9df3
@@ -117,8 +116,7 @@
cb9df3
 #define HAVE_OPAQUE_RSA_DSA_DH 1 /* since 1.1.0 -pre5 */
cb9df3
 #endif
cb9df3
cb9df3
-#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \
cb9df3
-  !defined(LIBRESSL_VERSION_NUMBER)
cb9df3
+#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) /* 1.0.2 or later */
cb9df3
 #define HAVE_X509_GET0_SIGNATURE 1
cb9df3
 #endif
cb9df3
cb9df3
@@ -1315,8 +1313,7 @@
cb9df3
   ch = SSL_get_peer_cert_chain(connssl->handle);
cb9df3
   st = SSL_CTX_get_cert_store(connssl->ctx);
cb9df3
cb9df3
-#if ((OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */ || \
cb9df3
-     defined(LIBRESSL_VERSION_NUMBER))
cb9df3
+#if (OPENSSL_VERSION_NUMBER <= 0x1000201fL) /* Fixed after 1.0.2a */
cb9df3
   /* The authorized responder cert in the OCSP response MUST be signed by the
cb9df3
      peer cert's issuer (see RFC6960 section 4.2.2.2). If that's a root cert,
cb9df3
      no problem, but if it's an intermediate cert OpenSSL has a bug where it
28edd9
diff -ru cmake-3.7.2.orig/Source/cmServerProtocol.cxx cmake-3.7.2/Source/cmServerProtocol.cxx
28edd9
--- cmake-3.7.2.orig/Source/cmServerProtocol.cxx        2017-01-13 15:05:41.000000000 +0100
28edd9
+++ cmake-3.7.2/Source/cmServerProtocol.cxx     2021-09-10 19:16:52.942413410 +0200
28edd9
@@ -26,6 +26,7 @@
28edd9
 #include <algorithm>
28edd9
 #include <string>
28edd9
 #include <vector>
28edd9
+#include <limits>
28edd9
28edd9
 // Get rid of some windows macros:
28edd9
 #undef max
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
diff -ru cmake-3.7.2.orig/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h cmake-3.7.2/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
--- cmake-3.7.2.orig/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h	2017-01-13 15:05:42.000000000 +0100
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
+++ cmake-3.7.2/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h	2018-05-08 22:39:23.249070904 +0200
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
@@ -28,7 +28,8 @@
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
 #include <openssl/hmac.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
 #include <openssl/opensslv.h>
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
 
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2070000fL)
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
 #include <stdlib.h> /* malloc, free */
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
 #include <string.h> /* memset */
Lucio Andrés Illanes Albornoz (arab, vxp) 4375f9
 static inline HMAC_CTX *HMAC_CTX_new(void)