Skip to content

Commit 043e94c

Browse files
rolandshoemakergopherbot
authored andcommitted
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 <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Roland Shoemaker <[email protected]>
1 parent 0d502d7 commit 043e94c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

x509roots/gen_fallback_bundle.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,14 @@ var bundle = mustParse([]byte(pemRoots))
6464
`
6565

6666
var (
67-
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)")
68-
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)")
67+
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)")
68+
certDataPath = flag.String("certdata-path", "", "Path to the NSS certdata.txt file to parse (this overrides certdata-url, if provided)")
6969
output = flag.String("output", "fallback/bundle.go", "Path to file to write output to")
7070
)
7171

7272
func main() {
7373
flag.Parse()
7474

75-
if *certDataPath != "" && *certDataURL != "" {
76-
log.Fatal("Only one of --certdata-url and --certdata-path may be supplied")
77-
}
78-
7975
var certdata io.Reader
8076

8177
if *certDataPath != "" {

0 commit comments

Comments
 (0)