Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnexpectedPayload = HandshakeError{/* contains filtered or unexported fields */} ErrDeadlineExceeded = HandshakeError{/* contains filtered or unexported fields */} ErrInvalidCredentials = HandshakeError{/* contains filtered or unexported fields */} ErrPeerDeclinedCredentials = HandshakeError{Err: errors.New("remote peer declined the credentials")} ErrSkipVerifyNotAllowed = HandshakeError{/* contains filtered or unexported fields */} ErrUnexpected = HandshakeError{/* contains filtered or unexported fields */} ErrIncompatibleVersion = HandshakeError{/* contains filtered or unexported fields */} ErrGotNotAHandshakeMessage = errors.New("go not a handshake message") )
Functions ¶
func IncomingHandshake ¶
func IncomingHandshake(ctx context.Context, sc sec.SecureConn, cc CredentialChecker) (identity []byte, err error)
func OutgoingHandshake ¶
func OutgoingHandshake(ctx context.Context, sc sec.SecureConn, cc CredentialChecker) (identity []byte, err error)
Types ¶
type CredentialChecker ¶
type CredentialChecker interface { MakeCredentials(sc sec.SecureConn) *handshakeproto.Credentials CheckCredential(sc sec.SecureConn, cred *handshakeproto.Credentials) (identity []byte, err error) }
type HandshakeError ¶
type HandshakeError struct { Err error // contains filtered or unexported fields }
func (HandshakeError) Error ¶
func (he HandshakeError) Error() string
Click to show internal directories.
Click to hide internal directories.