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

Method pickCipherSuite

handshake_client.go:458–466  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

456}
457
458func (hs *clientHandshakeState) pickCipherSuite() error {
459 if hs.suite = mutualCipherSuite(hs.hello.cipherSuites, hs.serverHello.cipherSuite); hs.suite == nil {
460 hs.c.sendAlert(alertHandshakeFailure)
461 return errors.New("tls: server chose an unconfigured cipher suite")
462 }
463
464 hs.c.cipherSuite = hs.suite.id
465 return nil
466}
467
468func (hs *clientHandshakeState) doFullHandshake() error {
469 c := hs.c

Callers 1

processServerHelloMethod · 0.95

Calls 2

mutualCipherSuiteFunction · 0.85
sendAlertMethod · 0.80

Tested by

no test coverage detected