summaryrefslogtreecommitdiff
path: root/homebrew/gnutls/.make.sh-auto
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/gnutls/.make.sh-auto')
-rw-r--r--homebrew/gnutls/.make.sh-auto8
1 files changed, 8 insertions, 0 deletions
diff --git a/homebrew/gnutls/.make.sh-auto b/homebrew/gnutls/.make.sh-auto
new file mode 100644
index 000000000..d02ea09ed
--- /dev/null
+++ b/homebrew/gnutls/.make.sh-auto
@@ -0,0 +1,8 @@
+pkg:setup
+keychains = %w[/System/Library/Keychains/SystemRootCertificates.keychain ]
+certs_list = `security find-certificate -a -p #{keychains.join(" ")}`
+certs = certs_list.scan(/-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----/m)
+valid_certs = certs.select do |cert|
+IO.popen("openssl x509 -inform pem -checkend 0 -noout", "w") do |openssl_io|
+openssl_io.write(cert)
+openssl_io.close_write