Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 Loading... | |
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 Loading... | |
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 } |
LEFT | RIGHT |