(suites []EchCipher)
| 203 | } |
| 204 | |
| 205 | func 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 | |
| 221 | func encodeInnerClientHello(inner *clientHelloMsg, maxNameLength int) ([]byte, error) { |
| 222 | h, err := inner.marshalMsg(true) |
no outgoing calls
no test coverage detected
searching dependent graphs…