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

Delta Between Two Patch Sets: src/pkg/crypto/tls/root_test.go

Issue 5262041: code review 5262041: crypto/tls: fetch root certificates using Mac OS API (Closed)
Left Patch Set: diff -r 988a7f023895 https://go.googlecode.com/hg/ Created 12 years, 5 months ago
Right Patch Set: diff -r 988a7f023895 https://go.googlecode.com/hg/ Created 12 years, 5 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
« no previous file with change/comment | « src/pkg/crypto/tls/root_stub.go ('k') | src/pkg/crypto/tls/root_unix.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 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 package tls 5 package tls
6 6
7 import ( 7 import (
8 "testing" 8 "testing"
9 ) 9 )
10 10
11 // For now, only here to exercise the cgo-based 11 var tlsServers = []string{
12 // root certificate fetcher. Mainly to make sure 12 » "google.com:443",
13 // they don't crash. 13 » "github.com:443",
14 // 14 » "twitter.com:443",
15 // x509.CertPool is not easily testable in isolation. 15 }
16
16 func TestOSCertBundles(t *testing.T) { 17 func TestOSCertBundles(t *testing.T) {
17 » roots := defaultRoots() 18 » defaultRoots()
18 » _ = roots 19
20 » if testing.Short() {
21 » » t.Logf("skipping certificate tests in short mode")
22 » » return
23 » }
24
25 » for _, addr := range tlsServers {
26 » » conn, err := Dial("tcp", addr, nil)
27 » » if err != nil {
28 » » » t.Errorf("unable to verify %v: %v", addr, err)
29 » » » continue
30 » » }
31 » » err = conn.Close()
32 » » if err != nil {
33 » » » t.Error(err)
34 » » }
35 » }
19 } 36 }
LEFTRIGHT

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