From f78f3037877850eb8a9e272da89cf436c99a2120 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Wed, 13 Jul 2016 11:29:17 -0400 Subject: [PATCH] git add tlsutil --- helper/tlsutil/tls.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 helper/tlsutil/tls.go diff --git a/helper/tlsutil/tls.go b/helper/tlsutil/tls.go new file mode 100644 index 000000000..28b1fb79e --- /dev/null +++ b/helper/tlsutil/tls.go @@ -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", +}