1
0
mirror of https://github.com/golang/go synced 2024-11-20 09:54:45 -07:00
go/src/crypto
Adam Langley ea64e5785d crypto/tls: fix renegotiation extension.
There are two methods by which TLS clients signal the renegotiation
extension: either a special cipher suite value or a TLS extension.

It appears that I left debugging code in when I landed support for the
extension because there's a "+ 1" in the switch statement that shouldn't
be there.

The effect of this is very small, but it will break Firefox if
security.ssl.require_safe_negotiation is enabled in about:config.
(Although almost nobody does this.)

This change fixes the original bug and adds a test. Sadly the test is a
little complex because there's no OpenSSL s_client option that mirrors
that behaviour of require_safe_negotiation.

Change-Id: Ia6925c7d9bbc0713e7104228a57d2d61d537c07a
Reviewed-on: https://go-review.googlesource.com/1900
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-01-06 19:50:07 +00:00
..
aes
cipher crypto/cipher: update docs for the Stream interface 2014-12-26 20:57:43 +00:00
des
dsa
ecdsa
elliptic
hmac
md5
rand crypto/rand: handle EAGAIN reads from /dev/urandom 2014-12-16 04:52:09 +00:00
rc4
rsa crypto/rsa: rsa.SignPSS with opts=nil shouldn't crash. 2015-01-06 19:18:28 +00:00
sha1
sha256
sha512
subtle
tls crypto/tls: fix renegotiation extension. 2015-01-06 19:50:07 +00:00
x509 crypto/x509: add missing copyright 2015-01-05 07:32:02 +00:00
crypto.go all: use golang.org/x/... import paths 2014-11-10 09:15:57 +11:00