Home | History | Annotate | Download | only in tls

Lines Matching defs:Handshake

30 	// constant after handshake; protected by handshakeMutex
33 // to running the handshake for this Conn. Other goroutines that need
34 // to wait for the handshake can wait on this, under handshakeMutex.
36 handshakeErr error // error resulting from handshake
41 // application data (i.e. is not currently processing a handshake).
63 // message during the most recent handshake. This is recorded because
75 // by the client or server in the most recent handshake. This is
88 hand bytes.Buffer // handshake data waiting to be read
565 // handshake data if handshake not yet completed,
574 return c.in.setErrorLocked(errors.New("tls: handshake or ChangeCipherSpec requested while not in handshake"))
579 return c.in.setErrorLocked(errors.New("tls: application data record requested while in handshake"))
610 return c.in.setErrorLocked(c.newRecordHeaderError("unsupported SSLv2 handshake received"))
632 return c.in.setErrorLocked(c.newRecordHeaderError("first record does not look like a TLS handshake"))
935 // readHandshake reads the next handshake message from
952 return nil, c.in.setErrorLocked(fmt.Errorf("tls: handshake message of length %d bytes exceeds maximum of %d bytes", n, maxHandshake))
999 // The handshake message unmarshalers
1029 if err := c.Handshake(); err != nil {
1072 // handleRenegotiation processes a HelloRequest handshake message.
1117 if err = c.Handshake(); err != nil {
1121 // Put this after Handshake, in case people were calling
1122 // Read(nil) for the side effect of the Handshake.
1139 // We received handshake bytes, indicating the
1220 var errEarlyCloseWrite = errors.New("tls: CloseWrite called before handshake complete")
1223 // called once the handshake has completed and does not call CloseWrite on the
1246 // Handshake runs the client or server handshake
1248 // Most uses of this package need not call Handshake
1250 func (c *Conn) Handshake() error {
1252 // c.handshakeMutex. In order to perform a handshake, we need to lock
1257 // need to check whether a handshake is pending (such as Write) to
1260 // Thus we first take c.handshakeMutex to check whether a handshake is
1265 // handshake. The problem was that it was possible for a Read to
1266 // complete the handshake once handshakeMutex was unlocked and then
1271 // to running the handshake and other goroutines can wait on it if they
1291 // running the handshake.
1300 // The handshake cannot have completed when handshakeMutex was unlocked
1303 panic("handshake should not have been able to complete after handshakeCond was set")
1320 panic("handshake should have had a result.")
1323 // Wake any other goroutines that are waiting for this handshake to
1381 return errors.New("tls: handshake has not yet been performed")
1384 return errors.New("tls: handshake did not verify certificate chain")