Changeset View
Changeset View
Standalone View
Standalone View
files/make-ca.sh
| Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | for tempfile in ${TEMPDIR}/certs/*.tmp; do | ||||
| fi | fi | ||||
| # If execution made it to here in the loop, the temp cert is trusted | # If execution made it to here in the loop, the temp cert is trusted | ||||
| # Find the cert data and generate a cert file for it | # Find the cert data and generate a cert file for it | ||||
| cp "${tempfile}" tempfile.cer | cp "${tempfile}" tempfile.cer | ||||
| perl ${CONVERTSCRIPT} > tempfile.crt | perl ${CONVERTSCRIPT} > tempfile.crt | ||||
| keyhash=$(openssl x509 -noout -in tempfile.crt -hash) | keyhash=$(openssl x509 -noout -in tempfile.crt -hash) | ||||
| if [ "$(file -b --mime-encoding tempfile.crt)" = "iso-8859-1" ]; then | |||||
| iconv -f iso-8859-1 -t ascii//TRANSLIT tempfile.crt -o tempfile.crt | |||||
| echo "Fix encoding for ${keyhash}" | |||||
| fi | |||||
| mv tempfile.crt "certs/${keyhash}.pem" | mv tempfile.crt "certs/${keyhash}.pem" | ||||
| rm -f tempfile.cer "${tempfile}" | rm -f tempfile.cer "${tempfile}" | ||||
| echo "Created ${keyhash}.pem" | echo "Created ${keyhash}.pem" | ||||
| done | done | ||||
| # Remove blacklisted files | # Remove blacklisted files | ||||
| # MD5 Collision Proof of Concept CA | # MD5 Collision Proof of Concept CA | ||||
| if test -f certs/8f111d69.pem; then | if test -f certs/8f111d69.pem; then | ||||
| echo "Certificate 8f111d69 is not trusted! Removing..." | echo "Certificate 8f111d69 is not trusted! Removing..." | ||||
| rm -f certs/8f111d69.pem | rm -f certs/8f111d69.pem | ||||
| fi | fi | ||||
| # Finally, generate the bundle and clean up. | # Finally, generate the bundle and clean up. | ||||
| cat certs/*.pem > ${BUNDLE} | cat certs/*.pem > ${BUNDLE} | ||||
| rm -r "${TEMPDIR}" | rm -r "${TEMPDIR}" | ||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.