From 208daceea6b3d34db94647dc44d986457e70f399 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 24 Apr 2014 13:25:54 -0500 Subject: openssl: simplify CA file bootstrap --- Library/Formula/openssl.rb | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/openssl.rb b/Library/Formula/openssl.rb index 4b4f0790a..69f7797aa 100644 --- a/Library/Formula/openssl.rb +++ b/Library/Formula/openssl.rb @@ -45,33 +45,14 @@ class Openssl < Formula etc/"openssl" end - def cert_pem - openssldir/"cert.pem" - end - - def osx_cert_pem - openssldir/"osx_cert.pem" - end - - def write_pem_file + def post_install keychains = %w[ /Library/Keychains/System.keychain /System/Library/Keychains/SystemRootCertificates.keychain ] - osx_cert_pem.atomic_write `security find-certificate -a -p #{keychains.join(" ")}` - end - - def post_install openssldir.mkpath - - if cert_pem.exist? - write_pem_file - else - cert_pem.unlink if cert_pem.symlink? - write_pem_file - openssldir.install_symlink 'osx_cert.pem' => 'cert.pem' - end + (openssldir/"cert.pem").atomic_write `security find-certificate -a -p #{keychains.join(" ")}` end test do -- cgit v1.2.3