diff --git a/Library/Formula/curl-ca-bundle.rb b/Library/Formula/curl-ca-bundle.rb deleted file mode 100644 index 513c3c3ff9d9..000000000000 --- a/Library/Formula/curl-ca-bundle.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'formula' - -class CurlCaBundle < Formula - homepage 'http://curl.haxx.se/docs/caextract.html' - url 'https://downloads.sourceforge.net/project/machomebrew/mirror/curl-ca-bundle-1.87.tar.bz2' - sha256 '41742f0c6aa689543ad037d1f7615b8620dae399d3cf2061a8d86d84a1b41f7f' - - def install - share.install 'ca-bundle.crt' - end - - def caveats; <<-EOS.undent - To use these certificates with OpenSSL: - - export SSL_CERT_FILE=#{opt_share}/ca-bundle.crt - EOS - end -end diff --git a/Library/Formula/openssl.rb b/Library/Formula/openssl.rb index 4b4f0790a397..2448c31636eb 100644 --- a/Library/Formula/openssl.rb +++ b/Library/Formula/openssl.rb @@ -45,33 +45,24 @@ def openssldir 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(" ")}` + openssldir.mkpath + (openssldir/"cert.pem").atomic_write `security find-certificate -a -p #{keychains.join(" ")}` end - def post_install - openssldir.mkpath + def caveats; <<-EOS.undent + A CA file has been bootstrapped using certificates from the system + keychain. To add additional certificates, place .pem files in + #{openssldir}/certs - 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 + and run + #{opt_bin}/c_rehash + EOS end test do