Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hls: add vod_hls_encryption_output_iv directive #1514

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

nonth
Copy link
Contributor

@nonth nonth commented Mar 1, 2024

According to issue #1507 , add the vod_hls_encryption_output_iv directive to output IV attributes to the #EXT-X-KEY tag in the m3u8 file.

This option will apply when vod_drm_enabled is enabled, and vod_hls_encryption_method is set to aes-128, with vod_hls_encryption_key_format set to none or identity.

@nonth
Copy link
Contributor Author

nonth commented Mar 11, 2024

@erankor any comment on this pr?

// https://datatracker.ietf.org/doc/html/rfc8216#section-5.2
if (conf->hls.encryption_method == HLS_ENC_AES_128 &&
(conf->hls.m3u8_config.encryption_key_format.len == 0 || ngx_strncmp(conf->hls.m3u8_config.encryption_key_format.data, "identity", conf->hls.m3u8_config.encryption_key_format.len) == 0) &&
conf->hls.output_iv)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see why we need all this complexity - would be better to just replace -

encryption_params->return_iv = FALSE;

with -

encryption_params->return_iv = conf->hls.output_iv;

if the user requested an iv - we return an iv.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean changing the line 174?

Initially, I only thought about returning the IV received from the external server. However, if you think changing the line 174 is sufficient, I can do that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done 🙂

@erankor
Copy link
Contributor

erankor commented Mar 15, 2024

Note that this is a directive, not a variable, please update the title/description accordingly.

@nonth nonth changed the title hls: add vod_hls_encryption_output_iv variable hls: add vod_hls_encryption_output_iv directive Mar 15, 2024
@shamamayair shamamayair merged commit 26f0687 into kaltura:master Mar 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants