merge-requests/1/head
Matthew 2020-12-22 19:12:11 -05:00
parent 89f094e113
commit fc10891459
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 6 additions and 6 deletions

View File

@ -24,17 +24,17 @@ func GetCertificateInfo(c *gin.Context) {
return return
} }
cipherSuite := tls.CipherSuiteName(resp.ConnectionState().CipherSuite) cipherSuite := tls.CipherSuiteName(resp.ConnectionState().CipherSuite)
ver := resp.ConnectionState().Version v := resp.ConnectionState().Version
var tlsVersion string var tlsVersion string
if ver == tls.VersionSSL30 { if v == tls.VersionSSL30 {
tlsVersion = "SSLv3" tlsVersion = "SSLv3"
} else if ver == tls.VersionTLS10 { } else if v == tls.VersionTLS10 {
tlsVersion = "TLSv1" tlsVersion = "TLSv1"
} else if ver == tls.VersionTLS11 { } else if v == tls.VersionTLS11 {
tlsVersion = "TLSv1.1" tlsVersion = "TLSv1.1"
} else if ver == tls.VersionTLS12 { } else if v == tls.VersionTLS12 {
tlsVersion = "TLSv1.2" tlsVersion = "TLSv1.2"
} else if ver == tls.VersionTLS13 { } else if v == tls.VersionTLS13 {
tlsVersion = "TLSv1.3" tlsVersion = "TLSv1.3"
} else { } else {
tlsVersion = "unknown" tlsVersion = "unknown"