go/src/crypto
Brad Fitzpatrick d24f446a90 crypto/tls: add Config.Clone
In Go 1.0, the Config struct consisted only of exported fields.

In Go 1.1, it started to grow private, uncopyable fields (sync.Once,
sync.Mutex, etc).

Ever since, people have been writing their own private Config.Clone
methods, or risking it and doing a language-level shallow copy and
copying the unexported sync variables.

Clean this up and export the Config.clone method as Config.Clone.
This matches the convention of Template.Clone from text/template and
html/template at least.

Fixes #15771
Updates #16228 (needs update in x/net/http2 before fixed)
Updates #16492 (not sure whether @agl wants to do more)

Change-Id: I48c2825d4fef55a75d2f99640a7079c56fce39ca
Reviewed-on: https://go-review.googlesource.com/28075
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Gerrand <adg@golang.org>
2016-09-01 04:26:12 +00:00
..
aes crypto/cipher, crypto/aes: add s390x implementation of AES-CTR 2016-04-29 21:17:31 +00:00
cipher crypto/cipher, math/big: fix example names 2016-08-16 14:36:32 +00:00
des all: remove unnecessary type conversions 2016-04-15 07:31:45 +00:00
dsa crypto/dsa: eliminate invalid PublicKey early 2016-04-05 17:41:47 +00:00
ecdsa math/big: add assembly implementation of arith for ppc64{le} 2016-08-29 21:03:21 +00:00
elliptic crypto/ecdsa: reject negative inputs. 2016-05-18 14:18:48 +00:00
hmac crypto/hmac: don't test for length equality in Equal. 2016-08-17 23:23:28 +00:00
md5 crypto/*, runtime: nacl asm fixes 2016-08-22 19:50:41 +00:00
rand all: single space after period. 2016-03-02 00:13:47 +00:00
rc4 all: fix assembly vet issues 2016-08-25 18:52:31 +00:00
rsa crypto/rsa, crypto/ecdsa: fail earlier on zero parameters 2016-04-05 21:03:20 +00:00
sha1 crypto/*, runtime: nacl asm fixes 2016-08-22 19:50:41 +00:00
sha256 crypto/sha256: add examples for New, Sum256 2016-08-31 05:13:48 +00:00
sha512 crypto/sha512: add s390x assembly implementation 2016-04-26 17:37:45 +00:00
subtle crypto/subtle: expand abbreviation to eliminate confusion 2016-06-09 15:30:48 +00:00
tls crypto/tls: add Config.Clone 2016-09-01 04:26:12 +00:00
x509 crypto/x509: Fix bug in UnknownAuthorityError.Error 2016-08-31 00:09:58 +00:00
crypto.go crypto: document that Signer.Sign does not hash 2016-01-26 16:27:16 +00:00