aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Shoemaker <roland@golang.org>2023-06-20 11:21:59 -0700
committerGopher Robot <gobot@golang.org>2023-06-20 18:34:45 +0000
commit043e94c17aa993f4d1026a2f692b8980e7740df2 (patch)
treed2045621645e977722e5e26ccbfd6ab96ce14be7
parent0d502d7cd64920c6d2cce3950ead89a5c4eb5e69 (diff)
downloadgo-x-crypto-043e94c17aa993f4d1026a2f692b8980e7740df2.tar.xz
x509roots: fix generate script argument checking
Check for supply of both arguments forgot that the URL is set by default. Instead just let the local path supersede the URL. Change-Id: I0499137c99c735e8e453ff1c2a925435f3cd8039 Reviewed-on: https://go-review.googlesource.com/c/crypto/+/504596 Run-TryBot: Roland Shoemaker <roland@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Roland Shoemaker <roland@golang.org>
-rw-r--r--x509roots/gen_fallback_bundle.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/x509roots/gen_fallback_bundle.go b/x509roots/gen_fallback_bundle.go
index c3e562f..c347c37 100644
--- a/x509roots/gen_fallback_bundle.go
+++ b/x509roots/gen_fallback_bundle.go
@@ -64,18 +64,14 @@ var bundle = mustParse([]byte(pemRoots))
`
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 (only one of certdata-url and certdata-path may be specified)")
- certDataPath = flag.String("certdata-path", "", "Path to the NSS certdata.txt file to parse (only one of certdata-url and certdata-path may be specified)")
+ 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")
)
func main() {
flag.Parse()
- if *certDataPath != "" && *certDataURL != "" {
- log.Fatal("Only one of --certdata-url and --certdata-path may be supplied")
- }
-
var certdata io.Reader
if *certDataPath != "" {