Alternative TLS implementation in Go
Go to file
Adam Langley 0581a2f81d 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
testdata crypto/tls: support TLS_FALLBACK_SCSV as a server. 2014-10-15 17:54:04 -07:00
alert.go crypto/tls: support TLS_FALLBACK_SCSV as a server. 2014-10-15 17:54:04 -07:00
cipher_suites.go crypto/tls: support TLS_FALLBACK_SCSV as a server. 2014-10-15 17:54:04 -07:00
common.go crypto/tls: change default minimum version to TLS 1.0. 2014-12-18 19:49:41 +00:00
conn_test.go crypto/tls: Added dynamic alternative to NameToCertificate map for SNI 2014-08-06 11:22:00 -07:00
conn.go crypto/tls: implement tls-unique channel binding (RFC 5929 section 3). 2014-08-11 16:40:42 -07:00
example_test.go crypto/x509: add example of using a custom root list. 2014-02-19 11:18:35 -05:00
generate_cert.go crypto/tls: Support ECDSA keys in generate_cert.go 2014-07-28 14:46:34 -07:00
handshake_client_test.go crypto/tls: print unexpected error in test 2014-09-07 09:07:19 -04:00
handshake_client.go crypto: add Signer 2014-08-29 12:36:30 -07:00
handshake_messages_test.go crypto/tls: add ALPN support. 2014-08-05 11:36:20 -07:00
handshake_messages.go crypto/tls: fix renegotiation extension. 2015-01-06 19:50:07 +00:00
handshake_server_test.go crypto/tls: fix renegotiation extension. 2015-01-06 19:50:07 +00:00
handshake_server.go crypto/tls: enable TLS_FALLBACK_SCSV in server with default max version 2014-12-18 19:36:01 +00:00
handshake_test.go crypto/tls: rework reference tests. 2013-12-20 11:37:05 -05:00
key_agreement.go crypto/tls: check curve equation in ECDHE. 2014-07-28 15:46:27 -07:00
prf_test.go crypto/tls: support TLS 1.1. 2013-06-04 20:02:22 -04:00
prf.go crypto/tls: fix TLS 1.2 client certificates. 2013-09-16 16:39:42 -04:00
ticket.go crypto/tls: ensure that we don't resume when tickets are disabled. 2014-09-26 11:02:09 +10:00
tls_test.go crypto/tls: implement tls-unique channel binding (RFC 5929 section 3). 2014-08-11 16:40:42 -07:00
tls.go crypto/tls: fix typo referencing the required Config field 2014-06-03 18:11:17 +10:00