]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/tls: clarify concurrent use of Config
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 20 Mar 2014 15:32:06 +0000 (08:32 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 20 Mar 2014 15:32:06 +0000 (08:32 -0700)
LGTM=r, agl
R=agl, r
CC=golang-codereviews
https://golang.org/cl/77530044

src/pkg/crypto/tls/common.go

index 0f59f702f8b7067c43f6dfe3004c5ed3bfded382..fca98bdd11c05e55de68cf482ecdda4696c28f78 100644 (file)
@@ -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.