handshake

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2023 License: MIT Imports: 8 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL