Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ca): outdated authorities / #445 #446

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .refresh-ca-certificates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

if ! test -d ./lib/httpclient; then
echo missing lib/httpclient directory
exit 1
elif ! test -d /usr/share/ca-certificates/mozilla; then
echo please install ca-certificates -- and execute on Debian
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