selectCipherSuite returns the first TLS 1.0–1.2 cipher suite from ids which is also in supportedIDs and passes the ok filter.
(ids, supportedIDs []uint16, ok func(*cipherSuite) bool)
| 173 | // selectCipherSuite returns the first TLS 1.0–1.2 cipher suite from ids which |
| 174 | // is also in supportedIDs and passes the ok filter. |
| 175 | func selectCipherSuite(ids, supportedIDs []uint16, ok func(*cipherSuite) bool) *cipherSuite { |
| 176 | for _, id := range ids { |
| 177 | candidate := cipherSuiteByID(id) |
| 178 | if candidate == nil || !ok(candidate) { |
| 179 | continue |
| 180 | } |
| 181 | |
| 182 | for _, suppID := range supportedIDs { |
| 183 | if id == suppID { |
| 184 | return candidate |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | return nil |
| 189 | } |
| 190 | |
| 191 | // A cipherSuiteTLS13 defines only the pair of the AEAD algorithm and hash |
| 192 | // algorithm to be used with HKDF. See RFC 8446, Appendix B.4. |
no test coverage detected
searching dependent graphs…