MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / ParseCipherList

Function ParseCipherList

tlsutil/util.go:71–88  ·  view source on GitHub ↗
(ciphers string)

Source from the content-addressed store, hash-verified

69}
70
71func ParseCipherList(ciphers string) ([]uint16, error) {
72 if ciphers == "" {
73 return nil, nil
74 }
75
76 cipherNameList := strings.Split(ciphers, ":")
77 cipherIDList := make([]uint16, 0, len(cipherNameList))
78
79 for _, name := range cipherNameList {
80 id, ok := cipherNameToID[name]
81 if !ok {
82 return nil, fmt.Errorf("unknown cipher %q", name)
83 }
84 cipherIDList = append(cipherIDList, id)
85 }
86
87 return cipherIDList, nil
88}
89
90func ParseCurveList(curves string) ([]tls.CurveID, error) {
91 if curves == "" {

Callers 2

makeServerTLSConfigFunction · 0.92
TLSConfigFromURLFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected