CipherSuiteName returns the standard name for the passed cipher suite ID (e.g. "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), or a fallback representation of the ID value if the cipher suite is not implemented by this package.
(id uint16)
| 97 | // (e.g. "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), or a fallback representation |
| 98 | // of the ID value if the cipher suite is not implemented by this package. |
| 99 | func CipherSuiteName(id uint16) string { |
| 100 | for _, c := range CipherSuites() { |
| 101 | if c.ID == id { |
| 102 | return c.Name |
| 103 | } |
| 104 | } |
| 105 | for _, c := range InsecureCipherSuites() { |
| 106 | if c.ID == id { |
| 107 | return c.Name |
| 108 | } |
| 109 | } |
| 110 | return fmt.Sprintf("0x%04X", id) |
| 111 | } |
| 112 | |
| 113 | const ( |
| 114 | // suiteECDHE indicates that the cipher suite involves elliptic curve |
nothing calls this directly
no test coverage detected
searching dependent graphs…