Created
June 14, 2019 17:41
-
-
Save asieira/097253a7041f9d0c74518ea2ffab3a05 to your computer and use it in GitHub Desktop.
Script to Import Brazilian root CAs (ICP Brasil) into Mac OS X system keychain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
mkdir tmp | |
cd tmp | |
curl http://acraiz.icpbrasil.gov.br/credenciadas/CertificadosAC-ICP-Brasil/ACcompactado.zip --output ACcompactado.zip | |
unzip ACcompactado.zip | |
rm *.zip | |
for file in *.crt | |
do | |
security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain $file | |
done | |
rm *.crt | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PLEASE check the integrity of the ZIP file or download it through HTTPS using another machine which already trusts the necessary icpbrasil.gov.br certificate chain.