CipherSuiteID returns the ID of the cipher suite associated with the given name, or 0 if the name is not recognized/supported.
(name string)
| 32 | // CipherSuiteID returns the ID of the cipher suite associated with |
| 33 | // the given name, or 0 if the name is not recognized/supported. |
| 34 | func CipherSuiteID(name string) uint16 { |
| 35 | for _, cs := range SupportedCipherSuites() { |
| 36 | if cs.Name == name { |
| 37 | return cs.ID |
| 38 | } |
| 39 | } |
| 40 | return 0 |
| 41 | } |
| 42 | |
| 43 | // SupportedCipherSuites returns a list of all the cipher suites |
| 44 | // Caddy supports. The list is NOT ordered by security preference. |
no test coverage detected