Documentation ¶
Index ¶
- Constants
- Variables
- type ClientHelloMsg
- type ECPointFormatsExtension
- type EncryptThenMacExtension
- type ExtendedMasterSecretExtension
- type Extension
- type Random
- type Record
- type RenegotiationInfoExtension
- type ServerHelloMsg
- type ServerNameExtension
- type SessionTicketExtension
- type SignatureAlgorithmsExtension
- type SupportedGroupsExtension
- type Version
Constants ¶
View Source
const ( ExtServerName uint16 = 0x00 ExtSupportedGroups uint16 = 0x0a ExtECPointFormats uint16 = 0x0b ExtSignatureAlgorithms uint16 = 0x0d ExtEncryptThenMac uint16 = 0x16 ExtExtendedMasterSecret uint16 = 0x17 ExtSessionTicket uint16 = 0x23 ExtRenegotiationInfo uint16 = 0xff01 )
View Source
const ( HelloRequest uint8 = 0 ClientHello uint8 = 1 ServerHello uint8 = 2 )
View Source
const ( ChangeCipherSpec = 0x14 EncryptedAlert = 0x15 Handshake = 0x16 AppData = 0x17 )
record content type
View Source
const (
RecordHeaderLen = 5
)
Variables ¶
View Source
var ( ErrShortBuffer = errors.New("short buffer") ErrTypeMismatch = errors.New("type mismatch") )
View Source
var (
ErrBadType = errors.New("bad type")
)
Functions ¶
This section is empty.
Types ¶
type ClientHelloMsg ¶
type ClientHelloMsg struct { Version Version Random Random SessionID []byte CipherSuites []uint16 CompressionMethods []uint8 Extensions []Extension }
func (*ClientHelloMsg) Decode ¶
func (m *ClientHelloMsg) Decode(data []byte) (err error)
func (*ClientHelloMsg) Encode ¶
func (m *ClientHelloMsg) Encode() (data []byte, err error)
type ECPointFormatsExtension ¶
type ECPointFormatsExtension struct {
Formats []uint8
}
func (*ECPointFormatsExtension) Decode ¶
func (ext *ECPointFormatsExtension) Decode(b []byte) error
func (*ECPointFormatsExtension) Encode ¶
func (ext *ECPointFormatsExtension) Encode() ([]byte, error)
func (*ECPointFormatsExtension) Type ¶
func (ext *ECPointFormatsExtension) Type() uint16
type EncryptThenMacExtension ¶
type EncryptThenMacExtension struct {
Data []byte
}
func (*EncryptThenMacExtension) Decode ¶
func (ext *EncryptThenMacExtension) Decode(b []byte) error
func (*EncryptThenMacExtension) Encode ¶
func (ext *EncryptThenMacExtension) Encode() ([]byte, error)
func (*EncryptThenMacExtension) Type ¶
func (ext *EncryptThenMacExtension) Type() uint16
type ExtendedMasterSecretExtension ¶
type ExtendedMasterSecretExtension struct {
Data []byte
}
func (*ExtendedMasterSecretExtension) Decode ¶
func (ext *ExtendedMasterSecretExtension) Decode(b []byte) error
func (*ExtendedMasterSecretExtension) Encode ¶
func (ext *ExtendedMasterSecretExtension) Encode() ([]byte, error)
func (*ExtendedMasterSecretExtension) Type ¶
func (ext *ExtendedMasterSecretExtension) Type() uint16
type RenegotiationInfoExtension ¶
type RenegotiationInfoExtension struct {
Data []byte
}
func (*RenegotiationInfoExtension) Decode ¶
func (ext *RenegotiationInfoExtension) Decode(b []byte) error
func (*RenegotiationInfoExtension) Encode ¶
func (ext *RenegotiationInfoExtension) Encode() ([]byte, error)
func (*RenegotiationInfoExtension) Type ¶
func (ext *RenegotiationInfoExtension) Type() uint16
type ServerHelloMsg ¶
type ServerHelloMsg struct { Version Version Random Random SessionID []byte CipherSuite uint16 CompressionMethod uint8 Extensions []Extension }
func (*ServerHelloMsg) Decode ¶
func (m *ServerHelloMsg) Decode(data []byte) (err error)
func (*ServerHelloMsg) Encode ¶
func (m *ServerHelloMsg) Encode() (data []byte, err error)
type ServerNameExtension ¶
func (*ServerNameExtension) Decode ¶
func (ext *ServerNameExtension) Decode(b []byte) error
func (*ServerNameExtension) Encode ¶
func (ext *ServerNameExtension) Encode() ([]byte, error)
func (*ServerNameExtension) Type ¶
func (ext *ServerNameExtension) Type() uint16
type SessionTicketExtension ¶
type SessionTicketExtension struct {
Data []byte
}
func (*SessionTicketExtension) Decode ¶
func (ext *SessionTicketExtension) Decode(b []byte) error
func (*SessionTicketExtension) Encode ¶
func (ext *SessionTicketExtension) Encode() ([]byte, error)
func (*SessionTicketExtension) Type ¶
func (ext *SessionTicketExtension) Type() uint16
type SignatureAlgorithmsExtension ¶
type SignatureAlgorithmsExtension struct {
Algorithms []uint16
}
func (*SignatureAlgorithmsExtension) Decode ¶
func (ext *SignatureAlgorithmsExtension) Decode(b []byte) error
func (*SignatureAlgorithmsExtension) Encode ¶
func (ext *SignatureAlgorithmsExtension) Encode() ([]byte, error)
func (*SignatureAlgorithmsExtension) Type ¶
func (ext *SignatureAlgorithmsExtension) Type() uint16
type SupportedGroupsExtension ¶
type SupportedGroupsExtension struct {
Groups []uint16
}
func (*SupportedGroupsExtension) Decode ¶
func (ext *SupportedGroupsExtension) Decode(b []byte) error
func (*SupportedGroupsExtension) Encode ¶
func (ext *SupportedGroupsExtension) Encode() ([]byte, error)
func (*SupportedGroupsExtension) Type ¶
func (ext *SupportedGroupsExtension) Type() uint16
Click to show internal directories.
Click to hide internal directories.