davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.95k stars 382 forks source link

Print connection SSL/TLS version #157

Closed dpanic closed 2 years ago

dpanic commented 2 years ago

Added support for printing SSL/TLS version of connection.

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

dpanic commented 2 years ago

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 commented 2 years ago

Okay, I perfectly understand. Thank you. Waiting for Dave then :-)

On Wed, Aug 4, 2021 at 1:21 PM Adam Chalkley @.***> wrote:

@.**** commented on this pull request.

In main.go https://github.com/davecheney/httpstat/pull/157#discussion_r682523861:

@@ -289,6 +289,25 @@ func visit(url *url.URL) { log.Fatalf("failed to read response: %v", err) }

  • // Print SSL/TLS version which is used for connection
  • connectedVia := "plaintext"
  • if resp.TLS != nil {
  • switch resp.TLS.Version {
  • //lint:ignore SA1019
  • case tls.VersionSSL30:

@dpanic https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davecheney/httpstat/pull/157#discussion_r682523861, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACUTPPYS2I6NHITBDMHGYDT3EPDHANCNFSM5A364BJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .