GNOME Bugzilla – Bug 765027
critical warning in rtspsrc when doing srtp
Last modified: 2016-04-16 14:28:29 UTC
Problem is that default_srtcp_params only fills "srtcp-cipher" and "srtcp-auth" in the caps. gst_mikey_message_new_from_caps requires srtp and srtcp both to be filled.
Can easily test with:
gst-rtsp-server/examples/test-video (after defining WITH_AUTH and WITH_TLS).
And a client pipeline with:
gst-launch-1.0 rtspsrc location=rtsps://user:firstname.lastname@example.org:8554/test tls-validation-flags=0 ! fakesink silent=false
These are the error:
** (gst-launch-1.0:10695): CRITICAL **: gst_rtsp_message_take_header: assertion 'value != NULL' failed
Program received signal SIGTRAP, Trace/breakpoint trap.
Created attachment 325893 [details] [review]
add srtp params in srtcp params too
This should be a regression from 1.6, where this worked IIRC.
Review of attachment 325893 [details] [review]:
The problem seems to be more that gst_mikey_message_new_from_caps() expects those fields (the srtcp ones) but never does anything at all with their content. This seems like a problem in that function
Can it make use of both fields if they are different? If not it should probably fail if both are provided and different, and if only one is provided it should use the one that was actually provided.
Created attachment 326057 [details] [review]
allow srtp or srtcp
According to the RFC:
only one algorithm can be given for encryption or authentication. gst_mikey_message_new_from_caps is generic for both SRTP and SRTCP and assumes encryption and authentication are enabled.
This patch doesn't require all fields to be passed. It allows passing srtp-cipher and srtp-auth or srtcp-cipher and srtcp-auth. It also allows passing all four, in which case the srtp params are preferred.
Created attachment 326065 [details] [review]
allow srtp or srtcp
s/gstmikey/mikey/ in commit log
Author: Aleix Conchillo Flaqué <email@example.com>
Date: Thu Apr 14 17:26:54 2016 -0700
mikey: allow passing srtp or srtcp to create mikey message
Current implementation requires all srtp and srtcp parameters to be
given in the caps. MIKEY uses only one algorithm for encryption and one
for authentication so we now allow passing srtp or srtcp parameters. If
both are given srtp parametres will be preferred.
*** Bug 764798 has been marked as a duplicate of this bug. ***