go/src/crypto/tls/handshake_server.go

type serverHandshakeState

// serverHandshake performs a TLS handshake as a server.
func (c *Conn) serverHandshake(ctx context.Context) error {}

func (hs *serverHandshakeState) handshake() error {}

// readClientHello reads a ClientHello message and selects the protocol version.
func (c *Conn) readClientHello(ctx context.Context) (*clientHelloMsg, error) {}

func (hs *serverHandshakeState) processClientHello() error {}

// negotiateALPN picks a shared ALPN protocol that both sides support in server
// preference order. If ALPN is not configured or the peer doesn't support it,
// it returns "" and no error.
func negotiateALPN(serverProtos, clientProtos []string, quic bool) (string, error) {}

// supportsECDHE returns whether ECDHE key exchanges can be used with this
// pre-TLS 1.3 client.
func supportsECDHE(c *Config, version uint16, supportedCurves []CurveID, supportedPoints []uint8) bool {}

func (hs *serverHandshakeState) pickCipherSuite() error {}

func (hs *serverHandshakeState) cipherSuiteOk(c *cipherSuite) bool {}

// checkForResumption reports whether we should perform resumption on this connection.
func (hs *serverHandshakeState) checkForResumption() error {}

func (hs *serverHandshakeState) doResumeHandshake() error {}

func (hs *serverHandshakeState) doFullHandshake() error {}

func (hs *serverHandshakeState) establishKeys() error {}

func (hs *serverHandshakeState) readFinished(out []byte) error {}

func (hs *serverHandshakeState) sendSessionTicket() error {}

func (hs *serverHandshakeState) sendFinished(out []byte) error {}

// processCertsFromClient takes a chain of client certificates either from a
// Certificates message and verifies them.
func (c *Conn) processCertsFromClient(certificate Certificate) error {}

func clientHelloInfo(ctx context.Context, c *Conn, clientHello *clientHelloMsg) *ClientHelloInfo {}