[go] cryto/tls: WIP Add noTLSFlags to bogo_shim_test

6 views
Skip to first unread message

Clide Stefani (Gerrit)

unread,
Jun 28, 2024, 10:40:09 AM (5 days ago) Jun 28
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Clide Stefani has uploaded the change for review

Commit message

cryto/tls: WIP Add noTLSFlags to bogo_shim_test
Change-Id: I43eaea9f5ec6da6811b150630a7dde24d108017e

Change diff

diff --git a/src/crypto/tls/bogo_shim_test.go b/src/crypto/tls/bogo_shim_test.go
index 2d8100d..6cc96b4 100644
--- a/src/crypto/tls/bogo_shim_test.go
+++ b/src/crypto/tls/bogo_shim_test.go
@@ -37,6 +37,9 @@
maxVersion = flag.Int("max-version", VersionTLS13, "")
expectVersion = flag.Int("expect-version", 0, "")

+ noTLS1 = flag.Bool("no-tls1", false, "")
+ noTLS11 = flag.Bool("no-tls11", false, "")
+ noTLS12 = flag.Bool("no-tls12", false, "")
noTLS13 = flag.Bool("no-tls13", false, "")

requireAnyClientCertificate = flag.Bool("require-any-client-certificate", false, "")
@@ -113,6 +116,32 @@

ClientSessionCache: NewLRUClientSessionCache(0),
}
+
+ // We do not check the MinVersion because by default BoringSSL uses VersionSSL30 as the MinVersion, but we only support VersionTLS10
+ if *noTLS1 {
+ cfg.MinVersion = VersionTLS11
+ }
+
+ if *noTLS11 {
+ if *noTLS1 {
+ cfg.MinVersion = VersionTLS12
+ } else if *noTLS12 && *noTLS13 {
+ cfg.MaxVersion = VersionTLS10
+ } else {
+ log.Fatal("recieved incompatible flags")
+ }
+ }
+
+ if *noTLS12 {
+ if *noTLS1 && *noTLS11 {
+ cfg.MinVersion = VersionTLS13
+ } else if *noTLS13 {
+ cfg.MaxVersion = VersionTLS11
+ } else {
+ log.Fatal("recieved incompatible flags")
+ }
+ }
+
if *noTLS13 && cfg.MaxVersion == VersionTLS13 {
cfg.MaxVersion = VersionTLS12
}

Change information

Files:
  • M src/crypto/tls/bogo_shim_test.go
Change size: S
Delta: 1 file changed, 29 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I43eaea9f5ec6da6811b150630a7dde24d108017e
Gerrit-Change-Number: 595775
Gerrit-PatchSet: 1
Gerrit-Owner: Clide Stefani <cstefan...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Clide Stefani (Gerrit)

unread,
Jun 28, 2024, 4:22:09 PM (5 days ago) Jun 28
to goph...@pubsubhelper.golang.org, Russell Webb, golang-co...@googlegroups.com
Attention needed from Russell Webb

Message from Clide Stefani

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Russell Webb
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I43eaea9f5ec6da6811b150630a7dde24d108017e
Gerrit-Change-Number: 595775
Gerrit-PatchSet: 3
Gerrit-Owner: Clide Stefani <cstefan...@gmail.com>
Gerrit-Reviewer: Russell Webb <russel...@protonmail.com>
Gerrit-Attention: Russell Webb <russel...@protonmail.com>
Gerrit-Comment-Date: Fri, 28 Jun 2024 20:22:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

qiu laidongfeng2 (Gerrit)

unread,
Jun 30, 2024, 9:48:43 AM (3 days ago) Jun 30
to Clide Stefani, goph...@pubsubhelper.golang.org, Russell Webb, golang-co...@googlegroups.com
Attention needed from Clide Stefani and Russell Webb

qiu laidongfeng2 voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Clide Stefani
  • Russell Webb
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I43eaea9f5ec6da6811b150630a7dde24d108017e
Gerrit-Change-Number: 595775
Gerrit-PatchSet: 3
Gerrit-Owner: Clide Stefani <cstefan...@gmail.com>
Gerrit-Reviewer: Russell Webb <russel...@protonmail.com>
Gerrit-Reviewer: qiu laidongfeng2 <26454...@qq.com>
Gerrit-Attention: Russell Webb <russel...@protonmail.com>
Gerrit-Attention: Clide Stefani <cstefan...@gmail.com>
Gerrit-Comment-Date: Sun, 30 Jun 2024 13:48:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
satisfied_requirement
open
diffy

Russell Webb (Gerrit)

unread,
2:28 PM (7 hours ago) 2:28 PM
to Clide Stefani, goph...@pubsubhelper.golang.org, Go LUCI, qiu laidongfeng2, golang-co...@googlegroups.com
Attention needed from Clide Stefani and Filippo Valsorda

Russell Webb voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Clide Stefani
  • Filippo Valsorda
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I43eaea9f5ec6da6811b150630a7dde24d108017e
    Gerrit-Change-Number: 595775
    Gerrit-PatchSet: 3
    Gerrit-Owner: Clide Stefani <cstefan...@gmail.com>
    Gerrit-Reviewer: Filippo Valsorda <fil...@golang.org>
    Gerrit-Reviewer: Russell Webb <russel...@protonmail.com>
    Gerrit-Reviewer: qiu laidongfeng2 <26454...@qq.com>
    Gerrit-Attention: Clide Stefani <cstefan...@gmail.com>
    Gerrit-Attention: Filippo Valsorda <fil...@golang.org>
    Gerrit-Comment-Date: Wed, 03 Jul 2024 18:27:58 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    unsatisfied_requirement
    satisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages