Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(656)

Delta Between Two Patch Sets: src/pkg/crypto/x509/root_nocgo_darwin.go

Issue 22020045: code review 22020045: crypto/x509: add non-cgo darwin system anchor certs (Closed)
Left Patch Set: diff -r c0c2d0b05a77 https://code.google.com/p/go Created 10 years, 3 months ago
Right Patch Set: diff -r c0c2d0b05a77 https://code.google.com/p/go Created 10 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 // Copyright 2013 The Go Authors. All rights reserved. 1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // +build !cgo 5 // +build !cgo
6 6
7 package x509 7 package x509
8 8
9 import "os/exec" 9 func initSystemRoots() {
10 10 » systemRoots, _ = execSecurityRoots()
11 func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate , err error) {
12 » return nil, nil
13 } 11 }
14
15 func initSystemRoots() {
16 roots := NewCertPool()
17
18 cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", "/System/Library/Keychains/SystemRootCertificates.keychain")
19 data, err := cmd.Output()
20 if err != nil {
21 return
22 }
23
24 roots.AppendCertsFromPEM(data)
25 systemRoots = roots
26 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b