diff options
Diffstat (limited to 'src/crypto/x509/root_omit_test.go')
-rw-r--r-- | src/crypto/x509/root_omit_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/crypto/x509/root_omit_test.go b/src/crypto/x509/root_omit_test.go new file mode 100644 index 0000000..5ab6c93 --- /dev/null +++ b/src/crypto/x509/root_omit_test.go @@ -0,0 +1,23 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin,arm64 darwin,amd64,ios +// +build x509omitbundledroots + +package x509 + +import ( + "strings" + "testing" +) + +func TestOmitBundledRoots(t *testing.T) { + cp, err := loadSystemRoots() + if err == nil { + t.Fatalf("loadSystemRoots = (pool %p, error %v); want non-nil error", cp, err) + } + if !strings.Contains(err.Error(), "root bundling disabled") { + t.Errorf("unexpected error doesn't mention bundling: %v", err) + } +} |