]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: fix renegotiation extension.
authorAdam Langley <agl@golang.org>
Fri, 19 Dec 2014 23:14:03 +0000 (15:14 -0800)
committerAdam Langley <agl@golang.org>
Tue, 6 Jan 2015 19:50:07 +0000 (19:50 +0000)
commitea64e5785d37487f40083a04d36f3d20c95b3f74
tree32845e66cf1023b784a0f9ad02be35de65b18f66
parentb1370742eedf4f1801d86399374802c4d606a6d7
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>
src/crypto/tls/handshake_messages.go
src/crypto/tls/handshake_server_test.go