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 735248 - hlsdemux: Support OpenSSL for AES decryption of HLS fragments
hlsdemux: Support OpenSSL for AES decryption of HLS fragments
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-08-22 21:38 UTC by GstBlub
Modified: 2014-08-28 07:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (5.15 KB, patch)
2014-08-22 21:38 UTC, GstBlub
needs-work Details | Review
Updated patch (4.09 KB, patch)
2014-08-25 14:44 UTC, GstBlub
committed Details | Review

Description GstBlub 2014-08-22 21:38:00 UTC
Created attachment 284257 [details] [review]
Patch

This allows the HLS plugin to be built if OpenSSL is available, but not libnettle or libgcrypt.
Comment 1 Olivier Crête 2014-08-22 21:50:09 UTC
Review of attachment 284257 [details] [review]:

::: ext/hls/gsthlsdemux.c
@@ +1684,3 @@
     last_sequence =
+        GST_M3U8_MEDIA_FILE (g_list_last (demux->client->current->files)->
+        data)->sequence;

Unrelated change

@@ +1786,3 @@
     if (GST_M3U8 (previous_variant->data)->iframe && new_bandwidth ==
+        GST_M3U8 (g_list_first (demux->client->main->iframe_lists)->
+            data)->bandwidth)

Unrelated change.

@@ +1854,3 @@
+{
+  int flen = 0;
+  int len = (int) length;

You may want to verify that length is < G_MAXINT.

@@ +1863,3 @@
+    return FALSE;
+  if (!EVP_DecryptFinal_ex (&demux->aes_ctx, decrypted_data + len, &flen))
+    return FALSE;

This shouldn't be required, as you've already checked that the length is a multiple of the block size (16 bytes), so there should never be extra data.
Comment 2 GstBlub 2014-08-25 14:44:19 UTC
Created attachment 284409 [details] [review]
Updated patch

Sorry, the unrelated changes were caused by the gnu indent tool complaining about code style.  See new patch that incorporates your suggestions.
Comment 3 Sebastian Dröge (slomo) 2014-08-28 07:35:26 UTC
commit 04ca7234618513d2cea765f66b0f9c9efc725867
Author: Thomas Bluemel <tbluemel@control4.com>
Date:   Fri Aug 22 15:18:59 2014 -0600

    hlsdemux: Support OpenSSL for AES decryption of HLS fragments
    
    https://bugzilla.gnome.org//show_bug.cgi?id=735248