Documentation
¶
Overview ¶
Package tlssession performs a TLS handshake over the control channel, and then it exchanges keys with the server over this secure channel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBadTLSInit is returned when TLS configuration cannot be initialized ErrBadTLSInit = errors.New("TLS init error") // ErrBadTLSHandshake is returned when the OpenVPN handshake failed. ErrBadTLSHandshake = errors.New("handshake failure") // ErrBadCA is returned when the CA file cannot be found or is not valid. ErrBadCA = errors.New("bad ca conf") // ErrBadKeypair is returned when the key or cert file cannot be found or is not valid. ErrBadKeypair = errors.New("bad keypair conf") // ErrBadParrot is returned for errors during TLS parroting ErrBadParrot = errors.New("cannot parrot") // ErrCannotVerifyCertChain is returned for certificate chain validation errors. ErrCannotVerifyCertChain = errors.New("cannot verify chain") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// NotifyTLS is a channel where we receive incoming notifications.
NotifyTLS chan *model.Notification
// KeyUP is used to send newly negotiated data channel keys ready to be
// used.
KeyUp *chan *session.DataChannelKey
// TLSRecordUp is data coming up from the control channel layer to us.
// TODO(ainghazal): considere renaming when we have merged the whole
// set of components. This name might not give a good idea of what the bytes being
// moved around are - this is a serialized control channel packet, which is
// mainly used to do the initial handshake and then receive control
// packets encrypted with this TLS session.
TLSRecordUp chan []byte
// TLSRecordDown is data being transferred down from us to the control
// channel.
TLSRecordDown *chan []byte
}
Service is the tlssession service. Make sure you initialize the channels before invoking Service.StartWorkers.
func (*Service) StartWorkers ¶
func (svc *Service) StartWorkers( config *config.Config, workersManager *workers.Manager, sessionManager *session.Manager, )
StartWorkers starts the tlssession workers. See the ARCHITECTURE file for more information about the packet-muxer workers.
Click to show internal directories.
Click to hide internal directories.