Skip to content

Commit

Permalink
fix(ca): outdated authorities / nahi#445
Browse files Browse the repository at this point in the history
  • Loading branch information
faust64 committed Sep 30, 2021
1 parent 4658227 commit 140d189
Show file tree
Hide file tree
Showing 2 changed files with 3,632 additions and 3,609 deletions.
37 changes: 37 additions & 0 deletions .refresh-ca-certificates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

if ! test -d ./lib/httpclient; then
echo missing lib/httpclient directory
exit 1
fi

NOW=$(date)
cat <<EOF >lib/httpclient/cacert.pem
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: $NOW
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
## It contains the certificates in PEM format and therefore
## can be directly used with curl / libcurl / php_curl, or with
## an Apache+mod_ssl webserver for SSL client authentication.
## Just configure this file as the SSLCACertificateFile.
EOF

find /usr/share/ca-certificates/mozilla/ -type f -name '*.crt' \
| while read f
do
name=`basename $f | sed -e 's|_| |g' -e 's|\.crt||'`
echo
echo $name
echo $name | sed 's|.|=|g'
cat $f
done >>lib/httpclient/cacert.pem

exit $?
Loading

0 comments on commit 140d189

Please sign in to comment.