diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2014-03-20 08:32:06 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2014-03-20 08:32:06 -0700 |
| commit | ca2cb5190bb9e13dbf7e13154480560f4d1d21a0 (patch) | |
| tree | 9d999e9a1819ba341f7b18a20b2eb4e4a5ea238b /src/pkg/crypto | |
| parent | b4e41b4680423b14d9558c9950dc22f78524d9f4 (diff) | |
| download | go-ca2cb5190bb9e13dbf7e13154480560f4d1d21a0.tar.xz | |
crypto/tls: clarify concurrent use of Config
LGTM=r, agl
R=agl, r
CC=golang-codereviews
https://golang.org/cl/77530044
Diffstat (limited to 'src/pkg/crypto')
| -rw-r--r-- | src/pkg/crypto/tls/common.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pkg/crypto/tls/common.go b/src/pkg/crypto/tls/common.go index 0f59f702f8..fca98bdd11 100644 --- a/src/pkg/crypto/tls/common.go +++ b/src/pkg/crypto/tls/common.go @@ -201,12 +201,15 @@ type ClientSessionCache interface { Put(sessionKey string, cs *ClientSessionState) } -// A Config structure is used to configure a TLS client or server. After one -// has been passed to a TLS function it must not be modified. +// A Config structure is used to configure a TLS client or server. +// After one has been passed to a TLS function it must not be +// modified. A Config may be reused; the tls package will also not +// modify it. type Config struct { // Rand provides the source of entropy for nonces and RSA blinding. // If Rand is nil, TLS uses the cryptographic random reader in package // crypto/rand. + // The Reader must be safe for use by multiple goroutines. Rand io.Reader // Time returns the current time as the number of seconds since the epoch. |
