From 91a823edc714105c8900632147cebfc176ca003d Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <kirill@korins.ky>
Date: Sat, 3 Sep 2022 19:06:22 +0200
Subject: [PATCH] macOS 10.7: Switch to OpenSSL

macOS before 10.8 requires to use OpenSSL because a lot of things is
simple missed.
---
 vendor/crypto-hash/Cargo.toml | 4 ++--
 vendor/crypto-hash/src/lib.rs | 8 ++++----
 vendor/libgit2-sys/build.rs   | 2 --
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/vendor/crypto-hash/Cargo.toml b/vendor/crypto-hash/Cargo.toml
index 2ae218e617..37cd476d80 100644
--- a/vendor/crypto-hash/Cargo.toml
+++ b/vendor/crypto-hash/Cargo.toml
@@ -23,9 +23,9 @@ license = "MIT"
 repository = "https://github.com/malept/crypto-hash"
 [dependencies.hex]
 version = "0.3"
-[target."cfg(any(target_os = \"macos\", target_os = \"ios\"))".dependencies.commoncrypto]
+[target."cfg(any(target_os = \"ios\"))".dependencies.commoncrypto]
 version = "0.2"
-[target."cfg(not(any(target_os = \"windows\", target_os = \"macos\", target_os = \"ios\")))".dependencies.openssl]
+[target."cfg(not(any(target_os = \"windows\", target_os = \"ios\")))".dependencies.openssl]
 version = "0.10"
 [target."cfg(target_os = \"windows\")".dependencies.winapi]
 version = "0.3"
diff --git a/vendor/crypto-hash/src/lib.rs b/vendor/crypto-hash/src/lib.rs
index fd553ba528..957756c21c 100644
--- a/vendor/crypto-hash/src/lib.rs
+++ b/vendor/crypto-hash/src/lib.rs
@@ -43,23 +43,23 @@
 
 #![warn(missing_docs)]
 
-#[cfg(any(target_os = "macos", target_os = "ios"))]
+#[cfg(target_os = "ios")]
 extern crate commoncrypto;
 extern crate hex;
-#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))]
+#[cfg(not(any(target_os = "ios", target_os = "windows")))]
 extern crate openssl;
 #[cfg(target_os = "windows")]
 extern crate winapi;
 
 use std::io::Write;
 
-#[cfg(any(target_os = "macos", target_os = "ios"))]
+#[cfg(target_os = "ios")]
 #[path = "imp/commoncrypto.rs"]
 mod imp;
 #[cfg(target_os = "windows")]
 #[path = "imp/cryptoapi.rs"]
 mod imp;
-#[cfg(not(any(target_os = "macos", target_os = "ios", target_os = "windows")))]
+#[cfg(not(any(target_os = "ios", target_os = "windows")))]
 #[path = "imp/openssl.rs"]
 mod imp;
 
diff --git a/vendor/libgit2-sys/build.rs b/vendor/libgit2-sys/build.rs
index e30a09b44a..a5af5eec64 100644
--- a/vendor/libgit2-sys/build.rs
+++ b/vendor/libgit2-sys/build.rs
@@ -136,8 +136,6 @@ fn main() {
 
         if windows {
             features.push_str("#define GIT_WINHTTP 1\n");
-        } else if target.contains("apple") {
-            features.push_str("#define GIT_SECURE_TRANSPORT 1\n");
         } else {
             features.push_str("#define GIT_OPENSSL 1\n");
             if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") {
-- 
2.37.2

