(curves string)
| 88 | } |
| 89 | |
| 90 | func ParseCurveList(curves string) ([]tls.CurveID, error) { |
| 91 | if curves == "" { |
| 92 | return nil, nil |
| 93 | } |
| 94 | |
| 95 | curveNameList := strings.Split(curves, ":") |
| 96 | curveIDList := make([]tls.CurveID, 0, len(curveNameList)) |
| 97 | |
| 98 | for _, name := range curveNameList { |
| 99 | id, ok := curveNameToID[name] |
| 100 | if !ok { |
| 101 | return nil, fmt.Errorf("unknown curve %q", name) |
| 102 | } |
| 103 | curveIDList = append(curveIDList, id) |
| 104 | } |
| 105 | |
| 106 | return curveIDList, nil |
| 107 | } |
| 108 | |
| 109 | func ParseVersion(s string) (uint16, error) { |
| 110 | var ver uint16 |
no test coverage detected