x509roots/fallback/bundle: add bundle package to export root certs

Fixes golang/go#69898

Change-Id: Idbb1bbe48016a622414c84a56fe26f48bfe712c8
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/687155
Reviewed-by: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
This commit is contained in:
Michael Stapelberg
2025-09-11 08:14:50 -07:00
committed by Gopher Robot
parent 8c9ba31836
commit 96dc232fbd
7 changed files with 106 additions and 65 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ import (
const tmpl = `// Code generated by gen_fallback_bundle.go; DO NOT EDIT.
package fallback
package bundle
var unparsedCertificates = []unparsedCertificate{
`
@@ -35,8 +35,8 @@ var unparsedCertificates = []unparsedCertificate{
var (
certDataURL = flag.String("certdata-url", "https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt", "URL to the raw certdata.txt file to parse (certdata-path overrides this, if provided)")
certDataPath = flag.String("certdata-path", "", "Path to the NSS certdata.txt file to parse (this overrides certdata-url, if provided)")
output = flag.String("output", "fallback/bundle.go", "Path to file to write output to")
derOutput = flag.String("deroutput", "fallback/bundle.der", "Path to file to write output to (DER certificate bundle)")
output = flag.String("output", "fallback/bundle/bundle.go", "Path to file to write output to")
derOutput = flag.String("deroutput", "fallback/bundle/bundle.der", "Path to file to write output to (DER certificate bundle)")
)
func main() {