瀏覽代碼

Switch the default TLS 1.3 variant to tls13_rfc.

Update-Note: If not explicitly configured to use tls13_all, callers that enable
TLS 1.3 will now only enable the final standard version.

Change-Id: Ifcfc65a9d8782c983df6e002925e8f77f45b6e53
Reviewed-on: https://boringssl-review.googlesource.com/31384
Commit-Queue: Steven Valdez <svaldez@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
kris/onging/CECPQ3_patch15
David Benjamin 6 年之前
committed by CQ bot account: commit-bot@chromium.org
父節點
當前提交
6855e0a470
共有 7 個檔案被更改,包括 23 行新增18 行删除
  1. +4
    -6
      include/openssl/ssl.h
  2. +2
    -2
      ssl/internal.h
  3. +1
    -1
      ssl/ssl_versions.cc
  4. +3
    -3
      ssl/test/runner/common.go
  5. +5
    -6
      ssl/test/runner/runner.go
  6. +4
    -0
      tool/client.cc
  7. +4
    -0
      tool/server.cc

+ 4
- 6
include/openssl/ssl.h 查看文件

@@ -3381,15 +3381,13 @@ OPENSSL_EXPORT int SSL_renegotiate_pending(SSL *ssl);
OPENSSL_EXPORT int SSL_total_renegotiations(const SSL *ssl);

// tls13_variant_t determines what TLS 1.3 variant to negotiate.
//
// TODO(svaldez): Make |tls13_rfc| the default after callers are switched to
// explicitly enable |tls13_all|.
enum tls13_variant_t {
tls13_default = 0,
tls13_rfc = 0,
tls13_draft23,
tls13_draft28,
tls13_rfc,
tls13_all = tls13_default,
// tls13_all enables all variants of TLS 1.3, to keep the transition smooth as
// early adopters move to the final version.
tls13_all,
};

// SSL_CTX_set_tls13_variant sets which variant of TLS 1.3 we negotiate. On the


+ 2
- 2
ssl/internal.h 查看文件

@@ -2794,7 +2794,7 @@ struct ssl_ctx_st {

// tls13_variant is the variant of TLS 1.3 we are using for this
// configuration.
tls13_variant_t tls13_variant = tls13_default;
tls13_variant_t tls13_variant = tls13_rfc;

bssl::UniquePtr<bssl::SSLCipherPreferenceList> cipher_list;

@@ -3123,7 +3123,7 @@ struct ssl_st {

// tls13_variant is the variant of TLS 1.3 we are using for this
// configuration.
tls13_variant_t tls13_variant = tls13_default;
tls13_variant_t tls13_variant = tls13_rfc;

// session is the configured session to be offered by the client. This session
// is immutable.


+ 1
- 1
ssl/ssl_versions.cc 查看文件

@@ -304,7 +304,7 @@ bool ssl_supports_version(SSL_HANDSHAKE *hs, uint16_t version) {
return version == TLS1_3_DRAFT28_VERSION;
case tls13_rfc:
return version == TLS1_3_VERSION;
case tls13_default:
case tls13_all:
return true;
}
}


+ 3
- 3
ssl/test/runner/common.go 查看文件

@@ -39,10 +39,10 @@ const (
)

const (
TLS13Default = 0
TLS13RFC = 0
TLS13Draft23 = 1
TLS13Draft28 = 2
TLS13RFC = 3
TLS13All = 3
)

var allTLSWireVersions = []uint16{
@@ -1772,7 +1772,7 @@ func (c *Config) isSupportedVersion(wireVers uint16, isDTLS bool) (uint16, bool)
if wireVers != VersionTLS13 {
return 0, false
}
case TLS13Default:
case TLS13All:
// Allow all of them.
default:
panic(c.TLS13Variant)


+ 5
- 6
ssl/test/runner/runner.go 查看文件

@@ -1024,8 +1024,7 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error {
panic(fmt.Sprintf("The name of test %q suggests that it's version specific, but min/max version in the Config is %x/%x. One of them should probably be %x", test.name, test.config.MinVersion, test.config.MaxVersion, ver.version))
}

// Ignore this check against "TLS13", since TLS13 is used in many test names.
if ver.tls13Variant != 0 && ver.tls13Variant != TLS13RFC {
if ver.tls13Variant != 0 {
var foundFlag bool
for _, flag := range test.flags {
if flag == "-tls13-variant" {
@@ -1418,11 +1417,11 @@ func allShimVersions(protocol protocol) []tlsVersion {
return allVersions(protocol)
}
tls13Default := tlsVersion{
name: "TLS13Default",
name: "TLS13All",
version: VersionTLS13,
excludeFlag: "-no-tls13",
versionWire: 0,
tls13Variant: TLS13Default,
tls13Variant: TLS13All,
}

var shimVersions []tlsVersion
@@ -5581,7 +5580,7 @@ func addVersionNegotiationTests() {
}

if expectedVersion == VersionTLS13 && runnerVers.tls13Variant != shimVers.tls13Variant {
if shimVers.tls13Variant != TLS13Default {
if shimVers.tls13Variant != TLS13All {
expectedVersion = VersionTLS12
}
}
@@ -5782,7 +5781,7 @@ func addVersionNegotiationTests() {
name: "IgnoreClientVersionOrder",
config: Config{
Bugs: ProtocolBugs{
SendSupportedVersions: []uint16{VersionTLS12, tls13Draft23Version},
SendSupportedVersions: []uint16{VersionTLS12, VersionTLS13},
},
},
expectedVersion: VersionTLS13,


+ 4
- 0
tool/client.cc 查看文件

@@ -341,6 +341,10 @@ static bool GetTLS13Variant(tls13_variant_t *out, const std::string &in) {
*out = tls13_rfc;
return true;
}
if (in == "all") {
*out = tls13_all;
return true;
}
return false;
}



+ 4
- 0
tool/server.cc 查看文件

@@ -161,6 +161,10 @@ static bool GetTLS13Variant(tls13_variant_t *out, const std::string &in) {
*out = tls13_rfc;
return true;
}
if (in == "all") {
*out = tls13_all;
return true;
}
return false;
}



Loading…
取消
儲存