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

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

Issue 157076: crypto/tls: add initial client implementation. (Closed)
Left Patch Set: Created 15 years, 4 months ago
Right Patch Set: code review 157076: crypto/tls: add initial client implementation. Created 15 years, 4 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/ca_set.go ('k') | src/pkg/crypto/tls/handshake_client.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 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 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 "crypto/rsa"; 8 "crypto/rsa";
9 "io"; 9 "io";
10 "os"; 10 "os";
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 // A Config structure is used to configure a TLS client or server. After one 62 // A Config structure is used to configure a TLS client or server. After one
63 // has been passed to a TLS function it must not be modified. 63 // has been passed to a TLS function it must not be modified.
64 type Config struct { 64 type Config struct {
65 // Rand provides the source of entropy for nonces and RSA blinding. 65 // Rand provides the source of entropy for nonces and RSA blinding.
66 Rand io.Reader; 66 Rand io.Reader;
67 // Time returns the current time as the number of seconds since the epoc h. 67 // Time returns the current time as the number of seconds since the epoc h.
68 Time func() int64; 68 Time func() int64;
69 Certificates []Certificate; 69 Certificates []Certificate;
70 » RootCAs»» *RootCASet; 70 » RootCAs»» *CASet;
rsc 2009/11/19 06:23:12 Root *CASet; ?
agl 2009/11/21 23:41:16 Changed RootCASet to just CASet. (Also renamed the
71 } 71 }
72 72
73 type Certificate struct { 73 type Certificate struct {
74 Certificate [][]byte; 74 Certificate [][]byte;
75 PrivateKey *rsa.PrivateKey; 75 PrivateKey *rsa.PrivateKey;
76 } 76 }
77 77
78 // A TLS record. 78 // A TLS record.
79 type record struct { 79 type record struct {
80 contentType recordType; 80 contentType recordType;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 func (nop) XORKeyStream(buf []byte) {} 113 func (nop) XORKeyStream(buf []byte) {}
114 114
115 func (nop) Write(buf []byte) (int, os.Error) { return len(buf), nil } 115 func (nop) Write(buf []byte) (int, os.Error) { return len(buf), nil }
116 116
117 func (nop) Sum() []byte { return nil } 117 func (nop) Sum() []byte { return nil }
118 118
119 func (nop) Reset() {} 119 func (nop) Reset() {}
120 120
121 func (nop) Size() int { return 0 } 121 func (nop) Size() int { return 0 }
LEFTRIGHT

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