Versions in this module Expand all Collapse all v0 v0.1.0 Jul 6, 2023 Changes in this version + const VersionDTLS12 + var ErrConnClosed = &FatalError + func CipherSuiteName(id CipherSuiteID) string + func CipherSuites() []*tls.CipherSuite + func InsecureCipherSuites() []*tls.CipherSuite + func Listen(network string, laddr *net.UDPAddr, config *Config) (net.Listener, error) + func NewListener(inner net.Listener, config *Config) (net.Listener, error) + type CertificateRequestInfo struct + AcceptableCAs [][]byte + func (cri *CertificateRequestInfo) SupportsCertificate(c *tls.Certificate) error + type CipherSuite interface + AuthenticationType func() CipherSuiteAuthenticationType + CertificateType func() clientcertificate.Type + Decrypt func(in []byte) ([]byte, error) + ECC func() bool + Encrypt func(pkt *recordlayer.RecordLayer, raw []byte) ([]byte, error) + HashFunc func() func() hash.Hash + ID func() CipherSuiteID + Init func(masterSecret, clientRandom, serverRandom []byte, isClient bool) error + IsInitialized func() bool + KeyExchangeAlgorithm func() CipherSuiteKeyExchangeAlgorithm + String func() string + type CipherSuiteAuthenticationType = ciphersuite.AuthenticationType + const CipherSuiteAuthenticationTypeAnonymous + const CipherSuiteAuthenticationTypeCertificate + const CipherSuiteAuthenticationTypePreSharedKey + type CipherSuiteID = ciphersuite.ID + const TLS_ECDHE_ECDSA_WITH_AES_128_CCM + const TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 + const TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 + const TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA + const TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 + const TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 + const TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + const TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA + const TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 + const TLS_PSK_WITH_AES_128_CBC_SHA256 + const TLS_PSK_WITH_AES_128_CCM + const TLS_PSK_WITH_AES_128_CCM_8 + const TLS_PSK_WITH_AES_128_GCM_SHA256 + const TLS_PSK_WITH_AES_256_CCM_8 + type CipherSuiteKeyExchangeAlgorithm = ciphersuite.KeyExchangeAlgorithm + const CipherSuiteKeyExchangeAlgorithmEcdhe + const CipherSuiteKeyExchangeAlgorithmNone + const CipherSuiteKeyExchangeAlgorithmPsk + type ClientAuthType int + const NoClientCert + const RequestClientCert + const RequireAndVerifyClientCert + const RequireAnyClientCert + const VerifyClientCertIfGiven + type ClientHelloInfo struct + CipherSuites []CipherSuiteID + RandomBytes [handshake.RandomBytesLength]byte + ServerName string + type Config struct + Certificates []tls.Certificate + CipherSuites []CipherSuiteID + ClientAuth ClientAuthType + ClientCAs *x509.CertPool + ConnectContextMaker func() (context.Context, func()) + CustomCipherSuites func() []CipherSuite + CustomClientHelloRandom func() [handshake.RandomBytesLength]byte + EllipticCurves []elliptic.Curve + ExtendedMasterSecret ExtendedMasterSecretType + FlightInterval time.Duration + GetCertificate func(*ClientHelloInfo) (*tls.Certificate, error) + GetClientCertificate func(*CertificateRequestInfo) (*tls.Certificate, error) + InsecureHashes bool + InsecureSkipVerify bool + InsecureSkipVerifyHello bool + KeyLogWriter io.Writer + LoggerFactory logging.LoggerFactory + MTU int + PSK PSKCallback + PSKIdentityHint []byte + ReplayProtectionWindow int + RootCAs *x509.CertPool + SRTPProtectionProfiles []SRTPProtectionProfile + ServerName string + SessionStore SessionStore + SignatureSchemes []tls.SignatureScheme + SupportedProtocols []string + VerifyConnection func(*State) error + VerifyPeerCertificate func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error + type Conn struct + func Client(conn net.Conn, config *Config) (*Conn, error) + func ClientWithContext(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) + func Dial(network string, raddr *net.UDPAddr, config *Config) (*Conn, error) + func DialWithContext(ctx context.Context, network string, raddr *net.UDPAddr, config *Config) (*Conn, error) + func Resume(state *State, conn net.Conn, config *Config) (*Conn, error) + func Server(conn net.Conn, config *Config) (*Conn, error) + func ServerWithContext(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) ConnectionState() State + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) Read(p []byte) (n int, err error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) SelectedSRTPProtectionProfile() (SRTPProtectionProfile, bool) + 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(p []byte) (int, error) + type ExtendedMasterSecretType int + const DisableExtendedMasterSecret + const RequestExtendedMasterSecret + const RequireExtendedMasterSecret + type FatalError = protocol.FatalError + type HandshakeError = protocol.HandshakeError + type InternalError = protocol.InternalError + type PSKCallback func([]byte) ([]byte, error) + type SRTPProtectionProfile = extension.SRTPProtectionProfile + const SRTP_AEAD_AES_128_GCM + const SRTP_AEAD_AES_256_GCM + const SRTP_AES128_CM_HMAC_SHA1_32 + const SRTP_AES128_CM_HMAC_SHA1_80 + type Session struct + ID []byte + Secret []byte + type SessionStore interface + Del func(key []byte) error + Get func(key []byte) (Session, error) + Set func(key []byte, s Session) error + type State struct + IdentityHint []byte + NegotiatedProtocol string + PeerCertificates [][]byte + SessionID []byte + func (s *State) ExportKeyingMaterial(label string, context []byte, length int) ([]byte, error) + func (s *State) MarshalBinary() ([]byte, error) + func (s *State) RemoteRandomBytes() [handshake.RandomBytesLength]byte + func (s *State) UnmarshalBinary(data []byte) error + type TemporaryError = protocol.TemporaryError + type TimeoutError = protocol.TimeoutError