Closed chenda6 closed 4 months ago
Confirmed, I am experiencing the same situation this effectively breaks Fairplay encryption.
OS is Linux, packager version 3e71302ba4-release
At line 145, the check should be:
if (*ciphertext_size < required_ciphertext_size - AES_BLOCK_SIZE)
due to RequiredOutputSize function stating: // mbedtls requires a buffer large enough for one extra block.
So required_ciphertext_size is 32 bytes due to mbedtls requirement whereas the actual ciphertext_size is 16 bytes
@chenda6 can you try this with the fix-integration-tests
branch which contains the totality of the 5 most recent pull requests I opened. Specifically the fixes in #1323 should resolve this specific issue.
System info
macOS Monterey 12.6 (cmake) https://github.com/shaka-project/shaka-packager/tree/cmake-porting-history
Issue and steps to reproduce the problem
Packager Command:
What is the expected result? MPEG-TS segments successfully encrypted and packaged.
What happens instead? Packager terminates early with following stack trace:
NOTE: Using packager version 2.6.1 works. This appears to be a regression related to https://github.com/shaka-project/shaka-packager/pull/1119/files