MCPcopy Create free account
hub / github.com/XTLS/REALITY / pickECHCipherSuite

Function pickECHCipherSuite

ech.go:205–219  ·  view source on GitHub ↗
(suites []EchCipher)

Source from the content-addressed store, hash-verified

203}
204
205func pickECHCipherSuite(suites []EchCipher) (EchCipher, error) {
206 for _, s := range suites {
207 // NOTE: all of the supported AEADs and KDFs are fine, rather than
208 // imposing some sort of preference here, we just pick the first valid
209 // suite.
210 if _, ok := hpke.SupportedAEADs[s.AEADID]; !ok {
211 continue
212 }
213 if _, ok := hpke.SupportedKDFs[s.KDFID]; !ok {
214 continue
215 }
216 return s, nil
217 }
218 return EchCipher{}, errors.New("tls: no supported symmetric ciphersuites for ECH")
219}
220
221func encodeInnerClientHello(inner *clientHelloMsg, maxNameLength int) ([]byte, error) {
222 h, err := inner.marshalMsg(true)

Callers 1

makeClientHelloMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…