git add tlsutil

This commit is contained in:
vishalnayak 2016-07-13 11:29:17 -04:00
parent 407722a9b4
commit f78f303787
1 changed files with 16 additions and 0 deletions

16
helper/tlsutil/tls.go Normal file
View File

@ -0,0 +1,16 @@
package tlsutil
import "crypto/tls"
// TLSLookup maps the tls_min_version configuration to the internal value
var TLSLookup = map[string]uint16{
"tls10": tls.VersionTLS10,
"tls11": tls.VersionTLS11,
"tls12": tls.VersionTLS12,
}
var TLSReverseLookup = map[uint16]string{
tls.VersionTLS10: "tls10",
tls.VersionTLS11: "tls11",
tls.VersionTLS12: "tls12",
}