aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x509roots/gen_fallback_bundle.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/x509roots/gen_fallback_bundle.go b/x509roots/gen_fallback_bundle.go
index ec3014f..ffea49b 100644
--- a/x509roots/gen_fallback_bundle.go
+++ b/x509roots/gen_fallback_bundle.go
@@ -105,6 +105,10 @@ func main() {
log.Fatalf("failed to parse %q: %s", *certDataPath, err)
}
+ if len(certs) == 0 {
+ log.Fatal("certdata.txt appears to contain zero roots")
+ }
+
sort.Slice(certs, func(i, j int) bool {
// Sort based on the stringified subject (which may not be unique), and
// break any ties by just sorting on the raw DER (which will be unique,