Skip to content

Print connection SSL/TLS version - #157

Merged
davecheney merged 7 commits into
davecheney:masterfrom
dpanic:master
Aug 24, 2021
Merged

davecheney merged 7 commits into
davecheney:masterfrom
dpanic:master

Conversation

@dpanic

@dpanic dpanic commented Jul 23, 2021 •

Copy link
Copy Markdown

Added support for printing SSL/TLS version of connection.

This is important to know, because TLSv1.3 has faster handshake than the others.

@davecheney davecheney left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this, I’m uncomfortable with the (unsecure) parenthetical, but I’m fine with adjusting the ConnectdVia default from “” to “plaintext”

@dpanic
dpanic requested a review from davecheney July 24, 2021 12:45

@davecheney davecheney left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you

@davecheney davecheney left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please address the linking error by adding the appropriate comment to disable the static check rule on that line.

@dpanic
dpanic requested a review from davecheney July 25, 2021 10:25

@davecheney davecheney left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, staticcheck is still unhappy

main.go:297:3: malformed linter directive; missing the required reason field? (compile)
main.go:297:8: tls.VersionSSL30 has been deprecated since Go 1.13 because it shouldn't be used: SSLv3 is cryptographically broken, and is no longer supported by this package. See golang.org/issue/32716. (SA1019)
Error: Process completed with exit code 1.

Comment thread main.go Outdated
if resp.TLS != nil {
switch resp.TLS.Version {
//lint:ignore SA1019
case tls.VersionSSL30:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try

case tls.VersionSSL30: //lint:ignore SA1019

It might require a comment after the ignore SA1019 but I cannot think of one. Honestly I'm more tempted to adjust the TLSConfig settings to never negotiate this setting so we don't have to check for it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Please retest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpanic if your last change doesn't work, maybe try the syntax shown here:

https://stackoverflow.com/a/66291436/903870

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thank you, waiting for you guys to check CI/CD

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed SSLv3.
Added TSLv1.0 as minimum version for connection.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davecheney probably you missed my commits. Please take look at it now

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atc0005 this is done. Please review

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dpanic I'm an observer of the project (actively learning/improving Go skills) and not directly associated with it. I thought I saw a potential opportunity to assist and spoke up. Apologies if I gave an impression otherwise.

@dpanic
dpanic requested a review from davecheney July 26, 2021 12:40
Add minimum version TLSv1.0
@dpanic

dpanic commented Jul 28, 2021

Copy link
Copy Markdown
Author

Sorry, staticcheck is still unhappy

main.go:297:3: malformed linter directive; missing the required reason field? (compile)
main.go:297:8: tls.VersionSSL30 has been deprecated since Go 1.13 because it shouldn't be used: SSLv3 is cryptographically broken, and is no longer supported by this package. See golang.org/issue/32716. (SA1019)
Error: Process completed with exit code 1.

Changes done. Please review

@dpanic

dpanic commented Aug 4, 2021 via email

Copy link
Copy Markdown
Author

Comment thread main.go Outdated
ServerName: host,
InsecureSkipVerify: insecure,
Certificates: readClientCert(clientCertFile),
MinVersion: tls.VersionTLS10,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this simpler and set the min TLS version to 1.2 then we only have to worry about 1.2 vs 1.3.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any updates? Do I need anything else to do?

@dpanic
dpanic requested a review from davecheney August 10, 2021 07:21
@davecheney
davecheney merged commit 7798401 into davecheney:master Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants