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

Method cipherSuiteOk

handshake_server.go:368–387  ·  view source on GitHub ↗
(c *cipherSuite)

Source from the content-addressed store, hash-verified

366}
367
368func (hs *serverHandshakeState) cipherSuiteOk(c *cipherSuite) bool {
369 if c.flags&suiteECDHE != 0 {
370 if !hs.ecdheOk {
371 return false
372 }
373 if c.flags&suiteECSign != 0 {
374 if !hs.ecSignOk {
375 return false
376 }
377 } else if !hs.rsaSignOk {
378 return false
379 }
380 } else if !hs.rsaDecryptOk {
381 return false
382 }
383 if hs.c.vers < VersionTLS12 && c.flags&suiteTLS12 != 0 {
384 return false
385 }
386 return true
387}
388
389// checkForResumption reports whether we should perform resumption on this connection.
390func (hs *serverHandshakeState) checkForResumption() bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected