GNOME Bugzilla – Bug 735248
hlsdemux: Support OpenSSL for AES decryption of HLS fragments
Last modified: 2014-08-28 07:35:43 UTC
Created attachment 284257 [details] [review] Patch This allows the HLS plugin to be built if OpenSSL is available, but not libnettle or libgcrypt.
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.
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.
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