-
-
Save jcjones/b25e07de3a48c3ed084f0f9e26911693 to your computer and use it in GitHub Desktop.
Regenerate all .certspec files for mozilla-central
This file contains 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
#!/bin/bash -xe | |
if [ $# -ne 1 ] ; then | |
echo "$0 <.certspec file>" | |
exit 1 | |
fi | |
certspec=$1 | |
pem=$(dirname ${certspec})/$(basename ${certspec} .certspec) | |
der=$(dirname ${certspec})/$(basename ${pem} .pem).der | |
if [ -e ${pem} ] ; then | |
./mach python ./security/manager/ssl/tests/unit/pycert.py <${certspec} >${pem} | |
openssl x509 -in ${pem} >/dev/null || exit 1 | |
elif [ -e ${der} ]; then | |
./mach python ./security/manager/ssl/tests/unit/pycert.py <${certspec} | openssl x509 -outform der >${der} | |
openssl x509 -in ${der} -inform der >/dev/null || exit 1 | |
else | |
echo "Unknown output, no der or pem for ${certspec}" | |
exit 1 | |
fi |
This file contains 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
#!/bin/bash | |
path=$1 | |
if [ $# -ne 1 ] ; then | |
path=. | |
fi | |
find ${path} -name "*.pem.certspec" -not -path "*obj-*" -and -not \ | |
\( -path "*/unit/test_baseline_requirements/ca.pem" \ | |
-or -path "*/unit/test_startcom_wosign/StartComCA.pem" \ | |
-or -path "*/unit/test_startcom_wosign/WoSignCA.pem" \) \ | |
| xargs -n1 ./jcj-regenerate-certspec-in-place | |
echo "TODOs:" | |
echo "Update EXPECTED_CHAIN in browser/base/content/test/general/ssl_error_reports.sjs" | |
echo "Update security/manager/ssl/tests/unit/test_x509.js" | |
echo "Update security/manager/ssl/tests/unit/test_content_signing.js" | |
echo "Update security/manager/ssl/tests/unit/test_cert_chains.js" | |
echo "Regenerate zip files in security/manager/ssl/tests/unit/test_signed_apps" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment