Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

openssl: apply yosemite certificate fix #38495

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 13 additions & 0 deletions Library/Formula/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ class Openssl < Formula
keg_only :provided_by_osx,
"Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries"

# This is a workaround for Apple removing the Equifax Secure CA root from the System in 10.10.3
# Their doing so has broken certificate verification and consquently secure connection for dependants.
# Scope this to Yosemite and remove immediately once Apple have fixed the issue.
resource "Equifax_CA" do
url "https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.pem"
sha256 "f24e19fb93983b4fd0a377335613305f330c699892c789356eb216449804d0e9"
end

def arch_args
{
:x86_64 => %w[darwin64-x86_64-cc enable-ec_nistp_64_gcc_128],
Expand Down Expand Up @@ -111,6 +119,11 @@ def post_install

openssldir.mkpath
(openssldir/"cert.pem").atomic_write `security find-certificate -a -p #{keychains.join(" ")}`

if MacOS.version == :yosemite
(openssldir/"certs").install resource("Equifax_CA")
system bin/"c_rehash"
end
end

def caveats; <<-EOS.undent
Expand Down