MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / GetTLSVersionFromString

Function GetTLSVersionFromString

rest/config.go:296–310  ·  view source on GitHub ↗
(stringV *string)

Source from the content-addressed store, hash-verified

294}
295
296func GetTLSVersionFromString(stringV *string) uint16 {
297 if stringV != nil {
298 switch *stringV {
299 case "tlsv1":
300 return tls.VersionTLS10
301 case "tlsv1.1":
302 return tls.VersionTLS11
303 case "tlsv1.2":
304 return tls.VersionTLS12
305 case "tlsv1.3":
306 return tls.VersionTLS13
307 }
308 }
309 return uint16(DefaultMinimumTLSVersionConst)
310}
311
312type invalidConfigInfo struct {
313 logged bool

Callers 2

ServeMethod · 0.85

Calls

no outgoing calls

Tested by 1