(ciphers string)
| 69 | } |
| 70 | |
| 71 | func 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 | |
| 90 | func ParseCurveList(curves string) ([]tls.CurveID, error) { |
| 91 | if curves == "" { |
no test coverage detected