GNOME Bugzilla – Bug 790315
srt: add stream encryption support
Last modified: 2017-11-15 15:54:01 UTC
For transmitting encrypted stream, SRT socket requires "passphrase" and crypto "key-length".
Created attachment 363557 [details] [review] [1/2] add gst_srt_client_connect_full
Created attachment 363558 [details] [review] [2/2]: add properties and set to srt socket
Review of attachment 363557 [details] [review]: ::: ext/srt/gstsrt.c @@ +82,3 @@ + if (passphrase != NULL && passphrase[0] != '\0') { + srt_setsockopt (sock, 0, SRTO_PASSPHRASE, passphrase, strlen (passphrase)); + srt_setsockopt (sock, 0, SRT_PBKEYLEN, &key_length, sizeof (int)); SRTO_PBKEYLEN
Review of attachment 363558 [details] [review]: Also squash with the other patch. ::: ext/srt/gstsrtbasesink.c @@ +108,3 @@ + break; + case PROP_KEY_LENGTH: + self->key_length = g_value_get_int (value); g_return_if_fail (g_value_get_int (value) == 16 || .. == 32 || .. == 128); ::: ext/srt/gstsrtbasesrc.c @@ +118,3 @@ + break; + case PROP_KEY_LENGTH: + self->key_length = g_value_get_int (value); same here ::: ext/srt/gstsrtserversink.c @@ +325,3 @@ + srt_setsockopt (priv->sock, 0, SRTO_PASSPHRASE, + base->passphrase, strlen (base->passphrase)); + srt_setsockopt (priv->sock, 0, SRT_PBKEYLEN, SRTO_ @@ +328,3 @@ + &base->key_length, sizeof (int)); + + GST_WARNING ("passphrase ==> %s", base->passphrase); GST_WARNING_OBJECT (sink, ...); @@ +331,3 @@ + + } else { + GST_WARNING ("No passphrase"); same here ::: ext/srt/gstsrtserversrc.c @@ +323,3 @@ + if (base->passphrase != NULL && base->passphrase[0] != '\0') { + srt_setsockopt (priv->sock, 0, SRTO_PASSPHRASE, + base->passphrase, strlen (base->passphrase)); SRTO_
Created attachment 363646 [details] [review] srt: add passphrase and keylength
Review of attachment 363646 [details] [review]: Looks good, lets merge this
Attachment @363646 was pushed as ec32124