elixir-webrtc / ex_webrtc

An Elixir implementation of the W3C WebRTC API
Apache License 2.0
270 stars 8 forks source link

Verify peer cert fingerprint #22

Closed mickel8 closed 7 months ago

mickel8 commented 7 months ago

When peer cert fingerprint does not match the one provided in SDP we will move to the failed state and stop the PeerConnection process for now.

The question is if we should stick to the permanent restart strategy in a GenServer as it makes Supervisor always restart our GenServer, even when exited with :normal, :shutdown or {:shutdown, term} reasons.

For now, I left this to be configured by a user using Supervisor.child_spec.

codecov[bot] commented 7 months ago

Codecov Report

Merging #22 (66e9c67) into master (6154a3b) will decrease coverage by 0.56%. The diff coverage is 82.35%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #22 +/- ## ========================================== - Coverage 84.40% 83.85% -0.56% ========================================== Files 10 10 Lines 449 483 +34 ========================================== + Hits 379 405 +26 - Misses 70 78 +8 ``` | [Files](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc) | Coverage Δ | | |---|---|---| | [lib/ex\_webrtc/dtls\_transport.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9kdGxzX3RyYW5zcG9ydC5leA==) | `84.14% <85.71%> (-2.87%)` | :arrow_down: | | [lib/ex\_webrtc/peer\_connection.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9wZWVyX2Nvbm5lY3Rpb24uZXg=) | `79.78% <76.92%> (+<0.01%)` | :arrow_up: | | [lib/ex\_webrtc/sdp\_utils.ex](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc#diff-bGliL2V4X3dlYnJ0Yy9zZHBfdXRpbHMuZXg=) | `85.86% <83.33%> (-0.90%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc). Last update [6154a3b...66e9c67](https://app.codecov.io/gh/elixir-webrtc/ex_webrtc/pull/22?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-webrtc).