diff options
Diffstat (limited to 'homebrew/opensslat11/.make.sh-auto')
-rw-r--r-- | homebrew/opensslat11/.make.sh-auto | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/homebrew/opensslat11/.make.sh-auto b/homebrew/opensslat11/.make.sh-auto new file mode 100644 index 000000000..c22a55950 --- /dev/null +++ b/homebrew/opensslat11/.make.sh-auto @@ -0,0 +1,9 @@ +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("#{bin}/openssl x509 -inform pem -checkend 0 -noout >/dev/null", "w") do |openssl_io| +openssl_io.write(cert) +openssl_io.close_write |