MCPcopy Create free account
hub / github.com/XTLS/Go / mutualCipherSuite

Function mutualCipherSuite

cipher_suites.go:610–617  ·  view source on GitHub ↗

mutualCipherSuite returns a cipherSuite given a list of supported ciphersuites and the id requested by the peer.

(have []uint16, want uint16)

Source from the content-addressed store, hash-verified

608// mutualCipherSuite returns a cipherSuite given a list of supported
609// ciphersuites and the id requested by the peer.
610func mutualCipherSuite(have []uint16, want uint16) *cipherSuite {
611 for _, id := range have {
612 if id == want {
613 return cipherSuiteByID(id)
614 }
615 }
616 return nil
617}
618
619func cipherSuiteByID(id uint16) *cipherSuite {
620 for _, cipherSuite := range cipherSuites {

Callers 3

makeClientHelloMethod · 0.85
loadSessionMethod · 0.85
pickCipherSuiteMethod · 0.85

Calls 1

cipherSuiteByIDFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…