summaryrefslogtreecommitdiff
path: root/src/crypto/x509/root.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/x509/root.go')
-rw-r--r--src/crypto/x509/root.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/crypto/x509/root.go b/src/crypto/x509/root.go
new file mode 100644
index 000000000..8aae14e09
--- /dev/null
+++ b/src/crypto/x509/root.go
@@ -0,0 +1,17 @@
+// Copyright 2012 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.
+
+package x509
+
+import "sync"
+
+var (
+ once sync.Once
+ systemRoots *CertPool
+)
+
+func systemRootsPool() *CertPool {
+ once.Do(initSystemRoots)
+ return systemRoots
+}