Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print connection SSL/TLS version #157

Merged
merged 7 commits into from
Aug 24, 2021
Merged

Print connection SSL/TLS version #157

merged 7 commits into from
Aug 24, 2021

Conversation

dpanic
Copy link

@dpanic dpanic commented Jul 23, 2021

Added support for printing SSL/TLS version of connection.

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

Copy link
Owner

@davecheney davecheney left a comment

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
Copy link
Owner

@davecheney davecheney left a comment

Choose a reason for hiding this comment

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

LGTM thank you

Copy link
Owner

@davecheney davecheney left a comment

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
Copy link
Owner

@davecheney davecheney left a comment

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.

main.go Outdated
if resp.TLS != nil {
switch resp.TLS.Version {
//lint:ignore SA1019
case tls.VersionSSL30:
Copy link
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
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

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
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
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
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
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

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
Copy link
Author

dpanic commented Jul 28, 2021

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
Copy link
Author

dpanic commented Aug 4, 2021 via email

main.go Outdated
@@ -272,6 +272,7 @@ func visit(url *url.URL) {
ServerName: host,
InsecureSkipVerify: insecure,
Certificates: readClientCert(clientCertFile),
MinVersion: tls.VersionTLS10,
Copy link
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
Author

Choose a reason for hiding this comment

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

Done

Copy link
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