Created
November 5, 2020 07:03
-
-
Save drillbits/0250ade076c072b0717d28d2e6ba7ebe to your computer and use it in GitHub Desktop.
check client TLS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go run main.go | jq . | |
{ | |
"given_cipher_suites": [ | |
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", | |
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", | |
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", | |
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", | |
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", | |
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", | |
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", | |
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", | |
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", | |
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", | |
"TLS_RSA_WITH_AES_128_GCM_SHA256", | |
"TLS_RSA_WITH_AES_256_GCM_SHA384", | |
"TLS_RSA_WITH_AES_128_CBC_SHA", | |
"TLS_RSA_WITH_AES_256_CBC_SHA", | |
"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", | |
"TLS_RSA_WITH_3DES_EDE_CBC_SHA", | |
"TLS_AES_128_GCM_SHA256", | |
"TLS_CHACHA20_POLY1305_SHA256", | |
"TLS_AES_256_GCM_SHA384" | |
], | |
"ephemeral_keys_supported": true, | |
"session_ticket_supported": false, | |
"tls_compression_supported": false, | |
"unknown_cipher_suite_supported": false, | |
"beast_vuln": false, | |
"able_to_detect_n_minus_one_splitting": false, | |
"insecure_cipher_suites": {}, | |
"tls_version": "TLS 1.3", | |
"rating": "Probably Okay" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
func main() { | |
hc := http.DefaultClient | |
req, err := http.NewRequest(http.MethodGet, "https://www.howsmyssl.com/a/check", nil) | |
if err != nil { | |
fmt.Printf("failed to create request: %s", err) | |
return | |
} | |
resp, err := hc.Do(req) | |
if err != nil { | |
fmt.Printf("failed to get response: %s", err) | |
return | |
} | |
b, err := ioutil.ReadAll(resp.Body) | |
if err != nil { | |
fmt.Printf("failed to read response body: %s", err) | |
return | |
} | |
fmt.Println(string(b)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment