After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730540 - rtspsrc: parse crypto sessions to support rollover counters
rtspsrc: parse crypto sessions to support rollover counters
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 1.8.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 765082
Blocks:
 
 
Reported: 2014-05-21 19:56 UTC by Aleix Conchillo Flaqué
Modified: 2016-04-19 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
parse crypto sessions (5.46 KB, patch)
2014-05-21 19:56 UTC, Aleix Conchillo Flaqué
none Details | Review
parse crypto sessions commit log fix (5.51 KB, patch)
2014-06-12 18:53 UTC, Aleix Conchillo Flaqué
none Details | Review
use srtp rollover counters (9.24 KB, patch)
2014-07-16 16:24 UTC, Aleix Conchillo Flaqué
none Details | Review
use srtp rollover counters memory leak fixes (9.22 KB, patch)
2014-10-30 22:51 UTC, Aleix Conchillo Flaqué
none Details | Review
add support for srtp rollover counters (3.31 KB, patch)
2016-04-15 07:50 UTC, Aleix Conchillo Flaqué
committed Details | Review

Description Aleix Conchillo Flaqué 2014-05-21 19:56:09 UTC
Created attachment 276948 [details] [review]
parse crypto sessions

This patch adds support for parsing the crypto sessions and keeps a map of SSRC and rollover counters.

The rollover counters are then used when the request-key signal is emitted by the encoder.
Comment 1 Aleix Conchillo Flaqué 2014-06-12 18:53:37 UTC
Created attachment 278365 [details] [review]
parse crypto sessions commit log fix

Add reference to this bug in the commit log.
Comment 2 Aleix Conchillo Flaqué 2014-07-16 16:24:16 UTC
Created attachment 280873 [details] [review]
use srtp rollover counters

This keeps the cipher, auth, key and rollover counter maps when parsing MIKEY and updates the caps when the decoder emits the "request-key" signal.
Comment 3 Aleix Conchillo Flaqué 2014-10-30 22:51:43 UTC
Created attachment 289701 [details] [review]
use srtp rollover counters memory leak fixes
Comment 4 Aleix Conchillo Flaqué 2016-04-15 07:50:33 UTC
Created attachment 326069 [details] [review]
add support for srtp rollover counters

new patch that depends on bug 765082
Comment 5 Sebastian Dröge (slomo) 2016-04-15 13:14:52 UTC
Review of attachment 326069 [details] [review]:

::: gst/rtsp/gstrtspsrc.c
@@ +2757,3 @@
+
+    if (ssrc == map->ssrc) {
+      gst_caps_set_simple (caps, "roc", G_TYPE_UINT, map->roc, NULL);

What's so special about the roc that we only need to handle that and none of the others?
Comment 6 Aleix Conchillo Flaqué 2016-04-15 13:45:24 UTC
(In reply to Sebastian Dröge (slomo) from comment #5)
> Review of attachment 326069 [details] [review] [review]:
> 
> ::: gst/rtsp/gstrtspsrc.c
> @@ +2757,3 @@
> +
> +    if (ssrc == map->ssrc) {
> +      gst_caps_set_simple (caps, "roc", G_TYPE_UINT, map->roc, NULL);
> 
> What's so special about the roc that we only need to handle that and none of
> the others?

The roc is used for authentication. You only care about the one for your ssrc.

https://tools.ietf.org/html/rfc3711#section-4.2

If I understand correctly, in GStreamer, one caps corresponds to one ssrc, so we only need the roc for that specific ssrc.
Comment 7 Sebastian Dröge (slomo) 2016-04-15 16:08:35 UTC
Comment on attachment 326069 [details] [review]
add support for srtp rollover counters

Alright!
Comment 8 Josep Torra Valles 2016-04-15 16:13:19 UTC
Comment on attachment 326069 [details] [review]
add support for srtp rollover counters

commit c36930535d5a20476aaa403477c51c76640a45a1
Author: Aleix Conchillo Flaqué <aleix@oblong.com>
Date:   Fri Apr 15 00:46:56 2016 -0700

    rtspsrc: add srtp rollover counters from mikey crypto sessions
    
    The server can send multiple crypto sessions, one for each SSRC with its
    own rollover counter. We parse this information and pass it to the SRTP
    decoder via the "request-key" signal.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730540