3 # Used to regenerate ca-bundle.crt from the Mozilla certdata.txt.
4 # Run as ./mkcabundle.pl > ca-bundle.crt
7 my $cvsroot = ':pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot';
8 my $certdata = 'mozilla/security/nss/lib/ckfw/builtins/certdata.txt';
10 open(IN, "cvs -d $cvsroot co -p $certdata|")
11 || die "could not check out certdata.txt";
16 # This is a bundle of X.509 certificates of public Certificate
17 # Authorities. It was generated from the Mozilla root CA list.
24 if (/^CKA_VALUE MULTILINE_OCTAL/) {
26 open(OUT, "|openssl x509 -text -inform DER -fingerprint")
27 || die "could not pipe to openssl x509";
28 } elsif (/^END/ && $incert) {
36 printf(OUT "%c", oct($b)) unless $b eq '';
38 } elsif (/^CVS_ID.*Revision: ([^ ]*).*/) {
39 print "# Generated from certdata.txt RCS revision $1\n#\n";