diff options
| author | Jack Nagel | 2014-04-24 13:25:54 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-24 13:29:13 -0500 |
| commit | 208daceea6b3d34db94647dc44d986457e70f399 (patch) | |
| tree | ef0a7fa762bebec80eb4e2d70cfabeabc4f3880b /Library | |
| parent | ab926db10c47352b38e114d0945ac1c0596eef74 (diff) | |
| download | homebrew-208daceea6b3d34db94647dc44d986457e70f399.tar.bz2 | |
openssl: simplify CA file bootstrap
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/openssl.rb | 23 |
1 files changed, 2 insertions, 21 deletions
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 |
