Commit Graph

70 Commits

Author SHA1 Message Date
Sean DuBois
3aab0355e0 Upgrade dtls, ice, stun and turn
New major version of all packages caused by DTLS upgrade
2024-08-12 13:45:35 -04:00
Sean DuBois
f388de6581 Update module github.com/pion/dtls/v2 to v3
Generated by renovateBot
2024-07-25 11:16:12 -05:00
Eric Daniels
05cafb3d03 Close unhandled rtcp simulcast streams
handleIncomingSSRC will call streamsForSSRC which
opens rtp/rtcp streams that if unhandled can be
leaked resources. Now we will proactively open
them before calling handleIncomingSSRC and close
then later. In the future it would be better to
do this inside handleIncomingSSRC to protect other
callers.
2024-07-23 00:03:17 -04:00
sirzooro
19d022423d Added support for SRTP_NULL_HMAC_SHA1_80 cipher
Added support for SRTP_NULL_HMAC_SHA1_80 protection profile (cipher).
It is disabled by default. You need to use SettingEngine and set list
of allowed SRTP protection profiles using its SetSRTPProtectionProfiles
function called with dtls.SRTP_NULL_HMAC_SHA1_80 as a parameter. You
need to do this for both pion peers. For non-pion ones you may need to
enable it somewhere too, as NULL cipher is usually disabled for security
reasons.
2024-07-20 17:53:37 -04:00
aggresss
dbf22543fe Fix interceptor.RTCPReaderFunc typo 2024-02-10 21:16:12 -05:00
Sean DuBois
58c9a54275 Add SetDTLSCustomCipherSuite to SettingEngine
Resolves #2512
2023-09-11 18:38:30 -04:00
Sean DuBois
dc4b591c4d Start pion/webrtc/v4
60eea43 is a breaking change
2023-09-05 11:48:14 -04:00
Sean DuBois
60eea430ac Close PeerConnection on DTLS CloseNotify
Resolves #1767
Resolves pion/dtls#151
2023-09-05 04:52:17 -04:00
renovate[bot]
ea23dec2b9 Update module transport, srtp, ice and turn
ReplayDetector introduced a breaking change
2023-09-03 23:59:43 -04:00
Nicolas Menard
448f4ba601 Add DTLS KeyLog configuration option in WebRTC API
Add an option in the setting engine to log TLS key material when a
DTLS connection is established with a peer.
The option exists in pion/dtls but is not easily accessible
2023-07-31 13:58:22 -04:00
Simon Cousineau
a0e9824bc9 DTLS: Add Client/RootCAs, ClientAuth, Secret Opts 2023-06-02 11:49:25 -04:00
lisa yan
4d3c4b13b1 Add SetDTLSConnectContextMaker to SettingEngine
Allows a user to set the context used during the DTLS Handshake. This
can be used to extend or reduce the timeout on the DTLS Handshake.

Resolves #2477
2023-05-18 23:16:42 -04:00
Patryk Rogalski
bb022d5b22 Implemented SRTP_AEAD_AES_256_GCM
This adds missing bits for
SRTP_AEAD_AES_256_GCM and updates
srtp module to v2.0.14.
2023-05-17 15:28:30 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Pion
308f8616a3 Update CI configs to v0.10.6
Update lint scripts and CI configs.
2023-04-08 14:24:19 -04:00
Anton
9671875982 Add SettingEngine.SetDTLSEllipticCurves
Allow users to explicitly configured the support EllipticCurves via
public API.
2023-03-02 22:20:04 -05:00
Alexey Khit
2a47c12f22 Add DTLS InsecureSkipHelloVerify option 2023-03-02 17:05:34 -05:00
Manish
df0ec0c09d Return bytes written for DtlsTransport.WriteRTCP 2023-03-02 16:58:08 -05:00
Pion
c1467e4871 Update CI configs to v0.7.2
Update lint scripts and CI configs.
2022-04-27 23:00:19 -04:00
boks1971
1846813609 DTLS retransmission interval setting
Add SetDTLSRetranmissionInterval setting to SettingEngine.

Add test for SetDTLSRetransmissionInterval
2022-02-07 22:57:31 +05:30
Bryan Phelps
e071a4eded Remove ICETransportStateNew check in DTLS Start
DTLS should be able to be negotiated over an already established
ICETransport

Resolves #2113
2022-02-03 14:49:05 -05:00
Sean DuBois
157220e800 Run gofmt to add new build constraints
Also remove some 1.13 specific WASM code
2022-01-17 22:36:01 -05:00
Sean DuBois
4a0e5e0231 Fix Fingerprint Verification disablement
Early return caused DTLSTransport to not be properly initialized and
broke offline-browser-communication demo
2021-11-19 21:50:18 -05:00
Sean DuBois
11b8873da2 Handle Simulcast RepairStream
Read + Discard packets from the Simulcast repair stream. When a
Simulcast stream is enabled the remote will send packets via the repair
stream for probing. We can't ignore these packets anymore because it
will cause gaps in the feedback reports

Resolves #1957
2021-09-15 15:08:22 -04:00
Sean DuBois
9677e616b7 Move defaultSrtpProtectionProfiles to constants.go
If a user is curious about the default value when configuring
SetSRTPProtectionProfiles this makes it easier to find.
2021-05-04 13:01:34 -07:00
digitalix
80fd6d8d59 Expose SRTP protection profiles in setting engine
Allows to override default SRTP protection profiles in settingengine.go
2021-05-04 20:27:15 +01:00
Sean DuBois
525d725846 Unexport ICETransport.NewEndpoint
This is a Pion-ism that accidentally was exported.
2021-04-11 11:05:27 -07:00
OrlandoCo
e1c6662934 Add WriteRTCP method to DTLSTransport
This will make possible to WriteRTCP using ORTC API
2021-03-31 20:56:09 -07:00
Sean DuBois
545613dcde Close DTLS when fingerprint verification fails
Before we would set the PeerConnection to failed, but we would leave the
DTLSTransport. This means that a user could still interact with the
other transports.

Relates to #1708
2021-03-17 16:48:08 -07:00
OrlandoCo
6ef4c1bba8 Add buffer factory
Allow to configure a buffer factory on SettingEngine to provide
a custom buffer for RTP/RTCP
2021-01-03 23:00:57 -05:00
Sean DuBois
70fb90c7fd Fix Simulcast routine leak
When a new SSRC is seen we start a Read loop for the packets. However if
we only see one packet this loop will just sit forever. If a user
doesn't send us enough packets to finish probing it will prevent any
subsequent streams from being probed.

Relates to #1345
2020-12-07 09:18:15 -08:00
Sean DuBois
7c2352003b Update pion/srtp and pion/transport
Removes context usage
2020-12-02 20:20:03 -08:00
Sean DuBois
9715626a0c Revert "Read/Write RTP/RTCP packets with context"
This change caused a ~24% performance decrease

Relates to pion/webrtc#1564

This reverts commit 47a7a64898.
2020-12-02 20:11:06 -08:00
Atsushi Watanabe
47a7a64898 Read/Write RTP/RTCP packets with context
Control cancel/timeout by context.
2020-12-01 11:08:48 +09:00
Sean DuBois
e32d766199 Improve TrackLocal error handling
* Return error to user when remote doesn't support codecs
* Assert that bindings are properly incremented/decremented
* Assert that a added track doesn't error even when disconnected

Relates to #1526
2020-11-27 23:07:29 -08:00
Sean DuBois
804a12fed3 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-30 09:06:34 -07:00
mission-liao
0786371c1e Keep sessions in atomic.Value
This modification attempts to fix a deadlock happens when closing a
peer-connection.

The deadlock scenario is:
- routine-1: DTLSTransport.Stop is called during closing, which holds
  the writer-lock of DTLSTransport, and it blocked by accepting from
  session.closed channel when trying to close SRTPSession.
- routine-2: its stacks located in the routine launched in
  srtp.session.start(...), this routine should close the session.closed
  channel, however, it blocked when sending to
  srtp.SessionSRTP.session.newStream
- routine-3: this routine should call strp.SessionSRTP.AcceptStream
  to release routine-2. However, it blocked when calling
  DTLSTransport.getSRTPSession(), it requires the reader-lock.

To resolve this issue, the instance of SessionSRTP is kept in
atomic.Value and avoid the requirement of reader-lock in
DTLSTransport.

Fixes #1430
2020-09-27 22:23:09 -07:00
soolaugust
6f6de25b24 Modify all hdlr to handler for better reading
change hdlr -> handler, Hdlr -> Handler for better reading.
Since this is first commit, add myself to contributors
2020-08-17 22:04:29 -07:00
Renovate Bot
ca3cc9d940 Update module pion/srtp to v1.5.0
Generated by renovateBot
2020-07-20 23:00:53 -07:00
Sean DuBois
89d7de1787 Start /v3
See #9 for the features we have planned, and the breaking changes that
may occur.
2020-06-25 09:45:27 -07:00
John Berthels
cc8d80178c Set role when actpass remote to DTLSRoleClient
This matches rfc5763, setup:active is RECOMMENDED

Relates to #494
2020-06-16 00:25:05 -07:00
Sean DuBois
32070dc053 Remove TODO for #753
I have resolved this issue, we don't need to support both ECDSA/RSA at
the same time. Most users will only ever do ECDSA anyway.
2020-04-26 01:03:16 -07:00
Atsushi Watanabe
4220088d78 Follow pion/dtls API change
Use ConnectionState().
2020-04-11 16:27:06 +09:00
Simon Eisenmann
b95ee52c41 Add helpers to disable replay protection
Sometimes the replay protection of SRTP and SRTCP needs to be disabled.
This change adds disableSRTPReplayProtection and
DisableSRTCPReplayProtection helpers to SettingEngine.
2020-04-06 08:37:16 +02:00
Atsushi Watanabe
438ac1eb2f Add replay protection setting to SettingEngine
Set windows size of each protocol by:
- SetDTLSReplayProtectionWindow
- SetSRTPReplayProtectionWindow
- SetSRTCPReplayProtectionWindow
2020-03-29 12:22:55 -07:00
Atsushi Watanabe
b457163d6d Discard double close error of dtls conn
sctp.Stream.Close() closes inner dtls connection.
2020-03-24 19:14:25 +09:00
Atsushi Watanabe
e7e1cf5a74 Upgrade pion/dtls to v2.0.0-rc.6
Follow dtls module API and module path update.
2020-02-17 09:01:33 +09:00
Sean DuBois
d10941f2a4 Add SettingEngine entries needed for offline sync
Allow users to set statice ICECredentials and to disable
DTLS Certificate Verification
2019-12-09 16:43:44 -08:00
Sean DuBois
7c216c2172 Bump DTLS
DTLS API has been updated to support multiple certificates. No
behavior changes for `pion/webrtc`
2019-11-27 00:34:50 -08:00
Sean DuBois
9eb515af7c Use pion/dtls v2
API now allows multiple certificates, there is no behavior change
this is just to bring things more inline with crypto/tls
2019-11-24 23:29:20 -08:00