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

Side by Side Diff: src/pkg/crypto/x509/root_plan9.go

Issue 6571056: code review 6571056: crypto/x509: add Plan 9 root certificate location (Closed)
Patch Set: diff -r 99bb8c9e067d https://code.google.com/p/go Created 11 years, 6 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:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/pkg/crypto/x509/root_stub.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // +build plan9
6
7 package x509
8
9 import "io/ioutil"
10
11 // Possible certificate files; stop after finding one.
12 var certFiles = []string{
13 "/sys/lib/tls/ca.pem",
14 }
15
16 func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate , err error) {
17 return nil, nil
18 }
19
20 func initSystemRoots() {
21 roots := NewCertPool()
22 for _, file := range certFiles {
23 data, err := ioutil.ReadFile(file)
24 if err == nil {
25 roots.AppendCertsFromPEM(data)
26 break
27 }
28 }
29
30 systemRoots = roots
31 }
OLDNEW
« no previous file with comments | « no previous file | src/pkg/crypto/x509/root_stub.go » ('j') | no next file with comments »

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