Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pion/dtls
/ functions
Functions
1,125 in github.com/pion/dtls
⨍
Functions
1,125
◇
Types & classes
171
↓ 362 callers
Method
Equal
Equal determines if two protocol versions are equal.
pkg/protocol/version.go:23
↓ 180 callers
Method
Run
(ctx context.Context, conn flightConn, initialState handshakeState)
handshaker.go:188
↓ 156 callers
Method
Close
Close closes the listener. Any blocked Accept operations will be unblocked and return errors.
pkg/net/net.go:23
↓ 91 callers
Method
RemoteAddr
RemoteAddr implements net.Conn.RemoteAddr.
conn.go:1474
↓ 83 callers
Function
mustHexDecode
(t *testing.T, s string)
pkg/crypto/ccm/ccm_test.go:17
↓ 70 callers
Method
String
String of CipherSuite, only used for logging
cipher_suite.go:82
↓ 43 callers
Function
Check
Check is a helper to throw errors in the examples.
examples/util/util.go:55
↓ 38 callers
Method
Read
Read reads data from the connection.
conn.go:448
↓ 37 callers
Function
GenerateSelfSigned
GenerateSelfSigned creates a self-signed certificate.
pkg/crypto/selfsign/selfsign.go:25
↓ 36 callers
Method
Error
()
errors.go:261
↓ 36 callers
Function
buildClientConfig
buildClientConfig builds a Config for client from the provided options.
options.go:194
↓ 34 callers
Method
Size
Size returns the total size of the header.
pkg/protocol/recordlayer/header.go:84
↓ 31 callers
Function
buildServerConfig
buildServerConfig builds a Config for server from the provided options.
options.go:180
↓ 31 callers
Function
testServer
( ctx context.Context, c net.PacketConn, rAddr net.Addr, cfg *Config, generateCertificate bool, )
conn_test.go:295
↓ 30 callers
Function
testClient
( ctx context.Context, pktConn net.PacketConn, rAddr net.Addr, cfg *Config, generateCertificate bool, )
conn_test.go:272
↓ 29 callers
Method
Done
()
conn.go:655
↓ 28 callers
Method
Marshal
()
pkg/protocol/content.go:23
↓ 27 callers
Method
WriteTo
WriteTo writes a single packet to the buffer. The supplied address will remain associated with the packet.
internal/net/buffer.go:71
↓ 27 callers
Function
equalInt
(t *testing.T, expected, actual int)
internal/net/buffer_test.go:19
↓ 25 callers
Method
HandshakeContext
HandshakeContext runs the client or server DTLS handshake protocol if it has not yet been run. The provided Context must be non-nil. If the context i
conn.go:300
↓ 24 callers
Method
Is
(err error)
errors.go:269
↓ 23 callers
Method
ReadFrom
ReadFrom reads a single packet from the buffer, or blocks until one is available.
internal/net/buffer.go:150
↓ 23 callers
Method
Write
Write writes len(payload) bytes from payload to the DTLS connection.
conn.go:485
↓ 23 callers
Method
push
Attempts to push a DTLS packet to the fragmentBuffer when it returns true it means the fragmentBuffer has inserted and the buffer shouldn't be handled
fragment_buffer.go:52
↓ 19 callers
Function
randomPort
(tb testing.TB)
e2e/e2e_test.go:49
↓ 19 callers
Function
testExtDataLength
testExtDataLength is used to check the declared length in an extension and trailing bytes. It should only be called after a succesfull unmarshal.
pkg/protocol/extension/extension_test.go:29
↓ 18 callers
Method
Write
(b []byte)
conn_test.go:3224
↓ 18 callers
Function
aesKey1to12
(t *testing.T)
pkg/crypto/ccm/ccm_test.go:25
↓ 17 callers
Method
Unmarshal
Unmarshal populates the header from encoded data.
pkg/protocol/handshake/header.go:43
↓ 17 callers
Method
Unmarshal
Unmarshal decodes the extension.
pkg/protocol/extension/key_share.go:86
↓ 16 callers
Method
Accept
Accept waits for and returns the next connection to the listener.
pkg/net/net.go:19
↓ 16 callers
Method
MarshalFixed
MarshalFixed encodes the Handshake.
pkg/protocol/handshake/random.go:27
↓ 16 callers
Method
assert
(t *testing.T)
e2e/e2e_test.go:179
↓ 16 callers
Method
cleanup
(t *testing.T)
e2e/e2e_test.go:227
↓ 16 callers
Function
newComm
( ctx context.Context, clientOpts []dtls.ClientOption, serverOpts []dtls.ServerOption, serverPort int, se
e2e/e2e_test.go:125
↓ 16 callers
Method
setOpenSSLInfo
setOpenSSLInfo sets OpenSSL-specific information in the comm struct. This is called by test functions that have this information available.
e2e/e2e_test.go:157
↓ 15 callers
Method
ID
ID of CipherSuite.
cipher_suite.go:85
↓ 15 callers
Method
Unmarshal
Unmarshal populates the extension from encoded data. This supports hybrid encoding: detects TLS 1.3 PSS schemes and handles them as full uint16, while
pkg/protocol/extension/signature_algorithms_cert.go:39
↓ 15 callers
Method
fullPullMap
fullPullMap pulls all handshakes between rules[0] to rules[len(rules)-1] as map. nolint:cyclop
handshake_cache.go:77
↓ 14 callers
Method
ConnectionState
ConnectionState returns basic DTLS details about the connection. Note that this replaced the `Export` function of v1.
conn.go:535
↓ 14 callers
Method
HashFunc
What Hash function is used during verification
cipher_suite.go:91
↓ 14 callers
Method
Unmarshal
Unmarshal populates the RecordLayer from binary.
pkg/protocol/recordlayer/recordlayer.go:70
↓ 14 callers
Method
Unmarshal
(data []byte)
pkg/protocol/handshake/handshake.go:65
↓ 14 callers
Method
getLocalConnectionID
()
state.go:288
↓ 13 callers
Method
CryptoHash
CryptoHash returns the crypto.Hash implementation for the given HashAlgorithm.
pkg/crypto/hash/hash.go:101
↓ 13 callers
Method
IsPSS
IsPSS returns true if the algorithm is an RSA-PSS signature scheme. It's tempting to check for range between 0x0804 and 0x080b, but 0x0807 is Ed25519
pkg/crypto/signature/signature.go:49
↓ 13 callers
Method
Marshal
Marshal encodes the Header.
pkg/protocol/handshake/header.go:30
↓ 13 callers
Function
validateCertificateSignatureAlgorithms
validateCertificateSignatureAlgorithms validates that all certificates in the chain use signature algorithms that are in the allowed list. This implem
crypto.go:425
↓ 12 callers
Method
Done
Done returns a channel signaling when it is done.
internal/closer/closer.go:38
↓ 12 callers
Method
Unmarshal
(data []byte)
pkg/protocol/content.go:24
↓ 12 callers
Function
UnpackDatagram
UnpackDatagram extracts all RecordLayer messages from a single datagram. Note that as with TLS, multiple handshake messages may be placed in the same
pkg/protocol/recordlayer/recordlayer.go:98
↓ 12 callers
Function
aesKey13to24
(t *testing.T)
pkg/crypto/ccm/ccm_test.go:31
↓ 12 callers
Function
defaultCompressionMethods
()
compression_method.go:8
↓ 12 callers
Function
fatal
(t *testing.T, errChan chan error, err error)
resume_test.go:35
↓ 11 callers
Function
SelfSign
SelfSign creates a self-signed certificate from a elliptic curve key.
pkg/crypto/selfsign/selfsign.go:45
↓ 11 callers
Function
generateKeySignature
If the client provided a "signature_algorithms" extension, then all certificates provided by the server MUST be signed by a hash/signature algorithm p
crypto.go:99
↓ 11 callers
Method
pullAndMerge
pullAndMerge calls pull and then merges the results, ignoring any null entries.
handshake_cache.go:139
↓ 11 callers
Function
verifyKeySignature
nolint:dupl,cyclop
crypto.go:136
↓ 10 callers
Method
AuthenticationType
AuthenticationType controls what authentication method is using during the handshake
cipher_suite.go:94
↓ 10 callers
Method
Close
Close closes the buffer, allowing unread packets to be read, but erroring on any new writes.
internal/net/buffer.go:215
↓ 10 callers
Function
GenerateSelfSignedWithDNS
GenerateSelfSignedWithDNS creates a self-signed certificate.
pkg/crypto/selfsign/selfsign.go:35
↓ 10 callers
Method
Handshake
Handshake runs the client or server DTLS handshake protocol if it has not yet been run. Most uses of this package need not call Handshake explicitly:
conn.go:286
↓ 10 callers
Function
NewPacketBuffer
NewPacketBuffer creates a new PacketBuffer.
internal/net/buffer.go:57
↓ 10 callers
Method
TypeValue
()
pkg/protocol/extension/extension.go:44
↓ 10 callers
Function
hasTooManyContexts
hasTooManyContexts is used in Marshal(). It returns whether the KeyShare struct has more than exactly one context.
pkg/protocol/extension/key_share.go:177
↓ 10 callers
Function
withConnectionIDGenerator
(g func() []byte)
e2e/e2e_test.go:326
↓ 9 callers
Method
Close
Close closes the connection.
conn.go:521
↓ 9 callers
Method
Marshal
Marshal encodes the RecordLayer to binary.
pkg/protocol/recordlayer/recordlayer.go:52
↓ 9 callers
Method
Timeout
Timeout implements net.Error.Timeout().
pkg/protocol/errors.go:46
↓ 9 callers
Function
WithCertificates
WithCertificates sets the certificate chain to present to the other side of the connection. For functional options, an explicitly empty slice is not a
options.go:216
↓ 9 callers
Function
defensiveCopy
defensiveCopy copies a slice. This prevents the caller from mutating the config after construction. Returns empty slice if input is empty.
options.go:39
↓ 8 callers
Method
Addr
Addr returns the listener's network address.
pkg/net/net.go:26
↓ 8 callers
Method
Encrypt
(pkt *recordlayer.RecordLayer, raw []byte)
cipher_suite.go:106
↓ 8 callers
Method
Error
()
pkg/protocol/errors.go:54
↓ 8 callers
Function
HkdfExpandLabel
HkdfExpandLabel implements RFC 8446 section 7.1 with RFC 9147 section 5.9's defined DTLS prefix.
pkg/crypto/keyschedule/keyschedule.go:38
↓ 8 callers
Method
Marshal
Marshal encodes the MessageCertificate13 into its wire format. Wire format: [1 byte] certificate_request_context length [0-255] certificate_req
pkg/protocol/handshake/message_certificate_13.go:68
↓ 8 callers
Method
Marshal
Marshal encodes the extension.
pkg/protocol/extension/key_share.go:27
↓ 8 callers
Function
NewCBC
NewCBC creates a DTLS CBC Cipher.
pkg/crypto/ciphersuite/cbc.go:35
↓ 8 callers
Function
PreMasterSecret
PreMasterSecret implements TLS 1.2 Premaster Secret generation given a keypair and a curve.
pkg/crypto/prf/prf.go:109
↓ 8 callers
Method
Set
Set save a session. For client, use server name as key. For server, use session id.
session.go:19
↓ 8 callers
Function
equalBytes
(t *testing.T, expected, actual []byte)
internal/net/buffer_test.go:34
↓ 8 callers
Function
equalUDPAddr
(t *testing.T, expected, actual net.Addr)
internal/net/buffer_test.go:25
↓ 8 callers
Method
getSRTPProtectionProfile
()
state.go:280
↓ 8 callers
Function
srvCliStr
(isClient bool)
handshaker.go:166
↓ 7 callers
Function
Client
Client establishes a DTLS connection over an existing connection. Deprecated: Use ClientWithOptions instead.
conn.go:383
↓ 7 callers
Method
Decrypt
(h recordlayer.Header, in []byte)
cipher_suite.go:107
↓ 7 callers
Method
Digest
Digest performs a digest on the passed value.
pkg/crypto/hash/hash.go:56
↓ 7 callers
Function
GenerateEncryptionKeys
GenerateEncryptionKeys is the final step TLS 1.2 PRF. Given all state generated so far generates the final keys need for encryption.
pkg/crypto/prf/prf.go:206
↓ 7 callers
Method
Marshal
()
pkg/protocol/handshake/handshake.go:64
↓ 7 callers
Method
Marshal
()
pkg/protocol/extension/extension.go:42
↓ 7 callers
Function
NewChaCha20Poly1305
NewChaCha20Poly1305 creates a DTLS ChaCha20-Poly1305 Cipher.
pkg/crypto/ciphersuite/chacha20poly1305.go:33
↓ 7 callers
Function
NewGCM
NewGCM creates a DTLS GCM Cipher.
pkg/crypto/ciphersuite/gcm.go:24
↓ 7 callers
Function
PutBigEndianUint24
PutBigEndianUint24 encodes a uint24 and places into out.
internal/util/util.go:24
↓ 7 callers
Method
ReadFrom
ReadFrom reads a single packet payload and its associated remote address from the underlying buffer.
internal/net/udp/packet_conn.go:312
↓ 7 callers
Function
Server
Server listens for incoming DTLS connections. Deprecated: Use ServerWithOptions instead.
conn.go:425
↓ 7 callers
Method
Temporary
Temporary implements net.Error.Temporary().
pkg/protocol/errors.go:49
↓ 7 callers
Function
Unmarshal
Unmarshal many extensions at once.
pkg/protocol/extension/extension.go:48
↓ 7 callers
Method
Unmarshal
Unmarshal populates the extension from encoded data.
pkg/protocol/extension/oid_filters.go:59
↓ 7 callers
Method
Unmarshal
Unmarshal populates the extension from encoded data.
pkg/protocol/extension/pre_shared_key.go:86
↓ 7 callers
Method
Unmarshal
Unmarshal parses either the ClientHello list or the ServerHello/HelloRetryRequest single value. Any version not recognized is discarded.
pkg/protocol/extension/supported_versions.go:70
next →
1–100 of 1,125, ranked by callers