Versions in this module Expand all Collapse all v0 v0.0.5 Jan 15, 2025 v0.0.4 Jan 15, 2025 v0.0.3 Jan 15, 2025 v0.0.2 Jan 15, 2025 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 dtlsnet.PacketListener, config *Config) (net.Listener, error) + func OnlySendCIDGenerator() func() []byte + func RandomCIDGenerator(size int) func() []byte + 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(h recordlayer.Header, 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 + CertificateRequestMessageHook func(handshake.MessageCertificateRequest) handshake.Message + Certificates []tls.Certificate + CipherSuites []CipherSuiteID + ClientAuth ClientAuthType + ClientCAs *x509.CertPool + ClientHelloMessageHook func(handshake.MessageClientHello) handshake.Message + ConnectionIDGenerator func() []byte + CustomCipherSuites func() []CipherSuite + DisableRetransmitBackoff bool + EllipticCurves []elliptic.Curve + ExtendedMasterSecret ExtendedMasterSecretType + FlightInterval time.Duration + GetCertificate func(*ClientHelloInfo) (*tls.Certificate, error) + GetClientCertificate func(*CertificateRequestInfo) (*tls.Certificate, error) + HelloRandomBytesGenerator func() [handshake.RandomBytesLength]byte + InsecureHashes bool + InsecureSkipVerify bool + InsecureSkipVerifyHello bool + KeyLogWriter io.Writer + LoggerFactory logging.LoggerFactory + MTU int + OnConnectionAttempt func(net.Addr) error + PSK PSKCallback + PSKIdentityHint []byte + PaddingLengthGenerator func(uint) uint + ReplayProtectionWindow int + RootCAs *x509.CertPool + SRTPMasterKeyIdentifier []byte + SRTPProtectionProfiles []SRTPProtectionProfile + ServerHelloMessageHook func(handshake.MessageServerHello) handshake.Message + 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.PacketConn, rAddr net.Addr, config *Config) (*Conn, error) + func Dial(network string, rAddr *net.UDPAddr, config *Config) (*Conn, error) + func Resume(state *State, conn net.PacketConn, rAddr net.Addr, config *Config) (*Conn, error) + func Server(conn net.PacketConn, rAddr net.Addr, config *Config) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) ConnectionState() (State, bool) + func (c *Conn) Handshake() error + func (c *Conn) HandshakeContext(ctx context.Context) error + 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) RemoteSRTPMasterKeyIdentifier() ([]byte, bool) + 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 + const SRTP_AES256_CM_SHA1_32 + const SRTP_AES256_CM_SHA1_80 + const SRTP_NULL_HMAC_SHA1_32 + const SRTP_NULL_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 + CipherSuiteID CipherSuiteID + 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