Documentation ¶
Overview ¶
Package NoiseLink_2 is a generated protocol buffer package.
It is generated from these files:
NoiseLink.2.proto
It has these top-level messages:
NoiseLinkNegotiationDataRequest1 NoiseLinkEarlyHandshakePayload NoiseLinkNegotiationDataResponse1 NoiseLinkHandshakePayloadResponse1 NoiseLinkHandshakePayloadRequest2 NoiseZeroLinkHandshakePayloadRequest1 NoiseZeroLinkHandshakePayloadResponse1
Index ¶
- Constants
- func HashKey(data []byte) uint64
- func Listen(laddr string, config *ConnectionConfig) (net.Listener, error)
- type Conn
- func (c *Conn) ChannelBinding() []byte
- func (c *Conn) Close() error
- func (c *Conn) ConnectionState() tls.ConnectionState
- func (c *Conn) Handshake() error
- func (c *Conn) InitializePacket() *buffer
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (n int, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) RunClientHandshake() error
- func (c *Conn) RunServerHandshake() error
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(b []byte) (int, error)
- type ConnectionConfig
- type ConnectionInfo
- type NoiseLinkEarlyHandshakePayload
- func (*NoiseLinkEarlyHandshakePayload) Descriptor() ([]byte, []int)
- func (m *NoiseLinkEarlyHandshakePayload) GetEvidenceRequestType() []string
- func (*NoiseLinkEarlyHandshakePayload) ProtoMessage()
- func (m *NoiseLinkEarlyHandshakePayload) Reset()
- func (m *NoiseLinkEarlyHandshakePayload) String() string
- type NoiseLinkHandshakePayloadRequest2
- func (*NoiseLinkHandshakePayloadRequest2) Descriptor() ([]byte, []int)
- func (m *NoiseLinkHandshakePayloadRequest2) GetEvidenceBlob() [][]byte
- func (m *NoiseLinkHandshakePayloadRequest2) GetEvidenceBlobType() []string
- func (*NoiseLinkHandshakePayloadRequest2) ProtoMessage()
- func (m *NoiseLinkHandshakePayloadRequest2) Reset()
- func (m *NoiseLinkHandshakePayloadRequest2) String() string
- type NoiseLinkHandshakePayloadResponse1
- func (*NoiseLinkHandshakePayloadResponse1) Descriptor() ([]byte, []int)
- func (m *NoiseLinkHandshakePayloadResponse1) GetEvidenceBlob() [][]byte
- func (m *NoiseLinkHandshakePayloadResponse1) GetEvidenceBlobType() []string
- func (m *NoiseLinkHandshakePayloadResponse1) GetEvidenceRequestType() []string
- func (*NoiseLinkHandshakePayloadResponse1) ProtoMessage()
- func (m *NoiseLinkHandshakePayloadResponse1) Reset()
- func (m *NoiseLinkHandshakePayloadResponse1) String() string
- type NoiseLinkNegotiationDataRequest1
- func (*NoiseLinkNegotiationDataRequest1) Descriptor() ([]byte, []int)
- func (m *NoiseLinkNegotiationDataRequest1) GetEarlyPayload() *NoiseLinkEarlyHandshakePayload
- func (m *NoiseLinkNegotiationDataRequest1) GetInitialProtocol() string
- func (m *NoiseLinkNegotiationDataRequest1) GetRetryProtocol() []string
- func (m *NoiseLinkNegotiationDataRequest1) GetServerName() string
- func (m *NoiseLinkNegotiationDataRequest1) GetSwitchProtocol() []string
- func (*NoiseLinkNegotiationDataRequest1) ProtoMessage()
- func (m *NoiseLinkNegotiationDataRequest1) Reset()
- func (m *NoiseLinkNegotiationDataRequest1) String() string
- type NoiseLinkNegotiationDataResponse1
- func (*NoiseLinkNegotiationDataResponse1) Descriptor() ([]byte, []int)
- func (m *NoiseLinkNegotiationDataResponse1) GetRejected() bool
- func (m *NoiseLinkNegotiationDataResponse1) GetResponse() isNoiseLinkNegotiationDataResponse1_Response
- func (m *NoiseLinkNegotiationDataResponse1) GetRetryProtocol() string
- func (m *NoiseLinkNegotiationDataResponse1) GetSwitchProtocol() string
- func (*NoiseLinkNegotiationDataResponse1) ProtoMessage()
- func (m *NoiseLinkNegotiationDataResponse1) Reset()
- func (m *NoiseLinkNegotiationDataResponse1) String() string
- func (*NoiseLinkNegotiationDataResponse1) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type NoiseLinkNegotiationDataResponse1_Rejected
- type NoiseLinkNegotiationDataResponse1_RetryProtocol
- type NoiseLinkNegotiationDataResponse1_SwitchProtocol
- type NoiseZeroLinkHandshakePayloadRequest1
- func (*NoiseZeroLinkHandshakePayloadRequest1) Descriptor() ([]byte, []int)
- func (m *NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceBlob() [][]byte
- func (m *NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceBlobType() []string
- func (m *NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceRequestType() []string
- func (*NoiseZeroLinkHandshakePayloadRequest1) ProtoMessage()
- func (m *NoiseZeroLinkHandshakePayloadRequest1) Reset()
- func (m *NoiseZeroLinkHandshakePayloadRequest1) String() string
- type NoiseZeroLinkHandshakePayloadResponse1
- func (*NoiseZeroLinkHandshakePayloadResponse1) Descriptor() ([]byte, []int)
- func (m *NoiseZeroLinkHandshakePayloadResponse1) GetEvidenceBlob() [][]byte
- func (m *NoiseZeroLinkHandshakePayloadResponse1) GetEvidenceBlobType() []string
- func (*NoiseZeroLinkHandshakePayloadResponse1) ProtoMessage()
- func (m *NoiseZeroLinkHandshakePayloadResponse1) Reset()
- func (m *NoiseZeroLinkHandshakePayloadResponse1) String() string
- type VerifyCallbackFunc
Constants ¶
const ( NOISE_DH_CURVE25519 = 1 NOISE_CIPHER_CHACHAPOLY = 1 NOISE_CIPHER_AESGCM = 2 NOISE_HASH_BLAKE2s = 1 NOISE_HASH_BLAKE2b = 2 NOISE_HASH_SHA256 = 3 NOISE_HASH_SHA512 = 4 NOISE_PATTERN_XX = 9 NOISE_PATTERN_IK = 14 NOISE_PATTERN_XX_FALLBACK = 16 )
from noise-c https://github.com/rweather/noise-c/blob/master/include/noise/protocol/constants.h
const ( RESPONSE_SWITCH = iota RESPONSE_RETRY RESPONSE_REJECT )
const MaxPayloadSize = math.MaxUint16 - 16 - uint16Size /*data len*/
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conn ¶
type Conn struct { HandshakeData []byte // contains filtered or unexported fields }
func (*Conn) ChannelBinding ¶
func (*Conn) ConnectionState ¶
func (c *Conn) ConnectionState() tls.ConnectionState
func (*Conn) Handshake ¶
Handshake runs the client or server handshake protocol if it has not yet been run. Most uses of this package need not call Handshake explicitly: the first Read or Write will call it automatically.
func (*Conn) InitializePacket ¶
func (c *Conn) InitializePacket() *buffer
InitializePacket adds additional sub-messages if needed
func (*Conn) Read ¶
Read reads data from the connection. Read can be made to time out and return a Error with Timeout() == true after a fixed time limit; see SetDeadline and SetReadDeadline.
func (*Conn) RemoteAddr ¶
RemoteAddr returns the remote network address.
func (*Conn) RunClientHandshake ¶
func (*Conn) RunServerHandshake ¶
func (*Conn) SetDeadline ¶
SetDeadline sets the read and write deadlines associated with the connection. A zero value for t means Read and Write will not time out. After a Write has timed out, the TLS state is corrupt and all future writes will return the same error.
func (*Conn) SetReadDeadline ¶
SetReadDeadline sets the read deadline on the underlying connection. A zero value for t means Read will not time out.
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline sets the write deadline on the underlying connection. A zero value for t means Write will not time out. After a Write has timed out, the TLS state is corrupt and all future writes will return the same error.
type ConnectionConfig ¶
type ConnectionInfo ¶
type NoiseLinkEarlyHandshakePayload ¶
type NoiseLinkEarlyHandshakePayload struct {
EvidenceRequestType []string `protobuf:"bytes,1,rep,name=evidence_request_type,json=evidenceRequestType" json:"evidence_request_type,omitempty"`
}
func (*NoiseLinkEarlyHandshakePayload) Descriptor ¶
func (*NoiseLinkEarlyHandshakePayload) Descriptor() ([]byte, []int)
func (*NoiseLinkEarlyHandshakePayload) GetEvidenceRequestType ¶
func (m *NoiseLinkEarlyHandshakePayload) GetEvidenceRequestType() []string
func (*NoiseLinkEarlyHandshakePayload) ProtoMessage ¶
func (*NoiseLinkEarlyHandshakePayload) ProtoMessage()
func (*NoiseLinkEarlyHandshakePayload) Reset ¶
func (m *NoiseLinkEarlyHandshakePayload) Reset()
func (*NoiseLinkEarlyHandshakePayload) String ¶
func (m *NoiseLinkEarlyHandshakePayload) String() string
type NoiseLinkHandshakePayloadRequest2 ¶
type NoiseLinkHandshakePayloadRequest2 struct { EvidenceBlobType []string `protobuf:"bytes,2,rep,name=evidence_blob_type,json=evidenceBlobType" json:"evidence_blob_type,omitempty"` EvidenceBlob [][]byte `protobuf:"bytes,3,rep,name=evidence_blob,json=evidenceBlob,proto3" json:"evidence_blob,omitempty"` }
func (*NoiseLinkHandshakePayloadRequest2) Descriptor ¶
func (*NoiseLinkHandshakePayloadRequest2) Descriptor() ([]byte, []int)
func (*NoiseLinkHandshakePayloadRequest2) GetEvidenceBlob ¶
func (m *NoiseLinkHandshakePayloadRequest2) GetEvidenceBlob() [][]byte
func (*NoiseLinkHandshakePayloadRequest2) GetEvidenceBlobType ¶
func (m *NoiseLinkHandshakePayloadRequest2) GetEvidenceBlobType() []string
func (*NoiseLinkHandshakePayloadRequest2) ProtoMessage ¶
func (*NoiseLinkHandshakePayloadRequest2) ProtoMessage()
func (*NoiseLinkHandshakePayloadRequest2) Reset ¶
func (m *NoiseLinkHandshakePayloadRequest2) Reset()
func (*NoiseLinkHandshakePayloadRequest2) String ¶
func (m *NoiseLinkHandshakePayloadRequest2) String() string
type NoiseLinkHandshakePayloadResponse1 ¶
type NoiseLinkHandshakePayloadResponse1 struct { EvidenceRequestType []string `protobuf:"bytes,1,rep,name=evidence_request_type,json=evidenceRequestType" json:"evidence_request_type,omitempty"` EvidenceBlobType []string `protobuf:"bytes,2,rep,name=evidence_blob_type,json=evidenceBlobType" json:"evidence_blob_type,omitempty"` EvidenceBlob [][]byte `protobuf:"bytes,3,rep,name=evidence_blob,json=evidenceBlob,proto3" json:"evidence_blob,omitempty"` }
func (*NoiseLinkHandshakePayloadResponse1) Descriptor ¶
func (*NoiseLinkHandshakePayloadResponse1) Descriptor() ([]byte, []int)
func (*NoiseLinkHandshakePayloadResponse1) GetEvidenceBlob ¶
func (m *NoiseLinkHandshakePayloadResponse1) GetEvidenceBlob() [][]byte
func (*NoiseLinkHandshakePayloadResponse1) GetEvidenceBlobType ¶
func (m *NoiseLinkHandshakePayloadResponse1) GetEvidenceBlobType() []string
func (*NoiseLinkHandshakePayloadResponse1) GetEvidenceRequestType ¶
func (m *NoiseLinkHandshakePayloadResponse1) GetEvidenceRequestType() []string
func (*NoiseLinkHandshakePayloadResponse1) ProtoMessage ¶
func (*NoiseLinkHandshakePayloadResponse1) ProtoMessage()
func (*NoiseLinkHandshakePayloadResponse1) Reset ¶
func (m *NoiseLinkHandshakePayloadResponse1) Reset()
func (*NoiseLinkHandshakePayloadResponse1) String ¶
func (m *NoiseLinkHandshakePayloadResponse1) String() string
type NoiseLinkNegotiationDataRequest1 ¶
type NoiseLinkNegotiationDataRequest1 struct { ServerName string `protobuf:"bytes,1,opt,name=server_name,json=serverName" json:"server_name,omitempty"` InitialProtocol string `protobuf:"bytes,2,opt,name=initial_protocol,json=initialProtocol" json:"initial_protocol,omitempty"` SwitchProtocol []string `protobuf:"bytes,3,rep,name=switch_protocol,json=switchProtocol" json:"switch_protocol,omitempty"` RetryProtocol []string `protobuf:"bytes,4,rep,name=retry_protocol,json=retryProtocol" json:"retry_protocol,omitempty"` EarlyPayload *NoiseLinkEarlyHandshakePayload `protobuf:"bytes,6,opt,name=early_payload,json=earlyPayload" json:"early_payload,omitempty"` }
func (*NoiseLinkNegotiationDataRequest1) Descriptor ¶
func (*NoiseLinkNegotiationDataRequest1) Descriptor() ([]byte, []int)
func (*NoiseLinkNegotiationDataRequest1) GetEarlyPayload ¶
func (m *NoiseLinkNegotiationDataRequest1) GetEarlyPayload() *NoiseLinkEarlyHandshakePayload
func (*NoiseLinkNegotiationDataRequest1) GetInitialProtocol ¶
func (m *NoiseLinkNegotiationDataRequest1) GetInitialProtocol() string
func (*NoiseLinkNegotiationDataRequest1) GetRetryProtocol ¶
func (m *NoiseLinkNegotiationDataRequest1) GetRetryProtocol() []string
func (*NoiseLinkNegotiationDataRequest1) GetServerName ¶
func (m *NoiseLinkNegotiationDataRequest1) GetServerName() string
func (*NoiseLinkNegotiationDataRequest1) GetSwitchProtocol ¶
func (m *NoiseLinkNegotiationDataRequest1) GetSwitchProtocol() []string
func (*NoiseLinkNegotiationDataRequest1) ProtoMessage ¶
func (*NoiseLinkNegotiationDataRequest1) ProtoMessage()
func (*NoiseLinkNegotiationDataRequest1) Reset ¶
func (m *NoiseLinkNegotiationDataRequest1) Reset()
func (*NoiseLinkNegotiationDataRequest1) String ¶
func (m *NoiseLinkNegotiationDataRequest1) String() string
type NoiseLinkNegotiationDataResponse1 ¶
type NoiseLinkNegotiationDataResponse1 struct { // Types that are valid to be assigned to Response: // *NoiseLinkNegotiationDataResponse1_SwitchProtocol // *NoiseLinkNegotiationDataResponse1_RetryProtocol // *NoiseLinkNegotiationDataResponse1_Rejected Response isNoiseLinkNegotiationDataResponse1_Response `protobuf_oneof:"response"` }
func (*NoiseLinkNegotiationDataResponse1) Descriptor ¶
func (*NoiseLinkNegotiationDataResponse1) Descriptor() ([]byte, []int)
func (*NoiseLinkNegotiationDataResponse1) GetRejected ¶
func (m *NoiseLinkNegotiationDataResponse1) GetRejected() bool
func (*NoiseLinkNegotiationDataResponse1) GetResponse ¶
func (m *NoiseLinkNegotiationDataResponse1) GetResponse() isNoiseLinkNegotiationDataResponse1_Response
func (*NoiseLinkNegotiationDataResponse1) GetRetryProtocol ¶
func (m *NoiseLinkNegotiationDataResponse1) GetRetryProtocol() string
func (*NoiseLinkNegotiationDataResponse1) GetSwitchProtocol ¶
func (m *NoiseLinkNegotiationDataResponse1) GetSwitchProtocol() string
func (*NoiseLinkNegotiationDataResponse1) ProtoMessage ¶
func (*NoiseLinkNegotiationDataResponse1) ProtoMessage()
func (*NoiseLinkNegotiationDataResponse1) Reset ¶
func (m *NoiseLinkNegotiationDataResponse1) Reset()
func (*NoiseLinkNegotiationDataResponse1) String ¶
func (m *NoiseLinkNegotiationDataResponse1) String() string
func (*NoiseLinkNegotiationDataResponse1) XXX_OneofFuncs ¶
func (*NoiseLinkNegotiationDataResponse1) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type NoiseLinkNegotiationDataResponse1_Rejected ¶
type NoiseLinkNegotiationDataResponse1_Rejected struct {
Rejected bool `protobuf:"varint,5,opt,name=rejected,oneof"`
}
type NoiseLinkNegotiationDataResponse1_RetryProtocol ¶
type NoiseLinkNegotiationDataResponse1_RetryProtocol struct {
RetryProtocol string `protobuf:"bytes,4,opt,name=retry_protocol,json=retryProtocol,oneof"`
}
type NoiseLinkNegotiationDataResponse1_SwitchProtocol ¶
type NoiseLinkNegotiationDataResponse1_SwitchProtocol struct {
SwitchProtocol string `protobuf:"bytes,3,opt,name=switch_protocol,json=switchProtocol,oneof"`
}
type NoiseZeroLinkHandshakePayloadRequest1 ¶
type NoiseZeroLinkHandshakePayloadRequest1 struct { EvidenceRequestType []string `protobuf:"bytes,1,rep,name=evidence_request_type,json=evidenceRequestType" json:"evidence_request_type,omitempty"` EvidenceBlobType []string `protobuf:"bytes,2,rep,name=evidence_blob_type,json=evidenceBlobType" json:"evidence_blob_type,omitempty"` EvidenceBlob [][]byte `protobuf:"bytes,3,rep,name=evidence_blob,json=evidenceBlob,proto3" json:"evidence_blob,omitempty"` }
func (*NoiseZeroLinkHandshakePayloadRequest1) Descriptor ¶
func (*NoiseZeroLinkHandshakePayloadRequest1) Descriptor() ([]byte, []int)
func (*NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceBlob ¶
func (m *NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceBlob() [][]byte
func (*NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceBlobType ¶
func (m *NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceBlobType() []string
func (*NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceRequestType ¶
func (m *NoiseZeroLinkHandshakePayloadRequest1) GetEvidenceRequestType() []string
func (*NoiseZeroLinkHandshakePayloadRequest1) ProtoMessage ¶
func (*NoiseZeroLinkHandshakePayloadRequest1) ProtoMessage()
func (*NoiseZeroLinkHandshakePayloadRequest1) Reset ¶
func (m *NoiseZeroLinkHandshakePayloadRequest1) Reset()
func (*NoiseZeroLinkHandshakePayloadRequest1) String ¶
func (m *NoiseZeroLinkHandshakePayloadRequest1) String() string
type NoiseZeroLinkHandshakePayloadResponse1 ¶
type NoiseZeroLinkHandshakePayloadResponse1 struct { EvidenceBlobType []string `protobuf:"bytes,2,rep,name=evidence_blob_type,json=evidenceBlobType" json:"evidence_blob_type,omitempty"` EvidenceBlob [][]byte `protobuf:"bytes,3,rep,name=evidence_blob,json=evidenceBlob,proto3" json:"evidence_blob,omitempty"` }
func (*NoiseZeroLinkHandshakePayloadResponse1) Descriptor ¶
func (*NoiseZeroLinkHandshakePayloadResponse1) Descriptor() ([]byte, []int)
func (*NoiseZeroLinkHandshakePayloadResponse1) GetEvidenceBlob ¶
func (m *NoiseZeroLinkHandshakePayloadResponse1) GetEvidenceBlob() [][]byte
func (*NoiseZeroLinkHandshakePayloadResponse1) GetEvidenceBlobType ¶
func (m *NoiseZeroLinkHandshakePayloadResponse1) GetEvidenceBlobType() []string
func (*NoiseZeroLinkHandshakePayloadResponse1) ProtoMessage ¶
func (*NoiseZeroLinkHandshakePayloadResponse1) ProtoMessage()
func (*NoiseZeroLinkHandshakePayloadResponse1) Reset ¶
func (m *NoiseZeroLinkHandshakePayloadResponse1) Reset()
func (*NoiseZeroLinkHandshakePayloadResponse1) String ¶
func (m *NoiseZeroLinkHandshakePayloadResponse1) String() string