go root 源码

  • 2022-07-15
  • 浏览 (855)

golang root 代码

文件路径:/src/crypto/x509/root.go

// 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

// To update the embedded iOS root store, update the -version
// argument to the latest security_certificates version from
// https://opensource.apple.com/source/security_certificates/
// and run "go generate". See https://golang.org/issue/38843.
//
//go:generate go run root_ios_gen.go -version 55188.120.1.0.1

import "sync"

var (
	once           sync.Once
	systemRoots    *CertPool
	systemRootsErr error
)

func systemRootsPool() *CertPool {
	once.Do(initSystemRoots)
	return systemRoots
}

func initSystemRoots() {
	systemRoots, systemRootsErr = loadSystemRoots()
	if systemRootsErr != nil {
		systemRoots = nil
	}
}

相关信息

go 源码目录

相关文章

go boring 源码

go boring_test 源码

go cert_pool 源码

go cert_pool_test 源码

go example_test 源码

go hybrid_pool_test 源码

go name_constraints_test 源码

go notboring 源码

go parser 源码

go parser_test 源码

0  赞