mirror of
https://github.com/freemkv/freemkv-keysources.git
synced 2026-10-07 18:13:11 +00:00
e27e876f49a5ff0a23add94658b3c6790262e1fc
A keydb can hand out a per-disc terminal Key::Unit (a UK entry keyed on disc_hash). Unlike a derived key (Device/Processing/Media/Volume), a terminal UK is applied as-is by Disc::decrypt_with: it is NOT re-derived through the MKB-verified AACS resolver, so a UK entry whose hash matches the disc but whose key bytes are wrong is only disproved by descrambling real ciphertext. KeydbSource inherited the default needs_samples() == false, so on the autorip auto-resume / mux-worker path (which samples units only when some source reports needs_samples()) a keydb-only resolve ran with empty samples and committed a wrong UK as success, muxing undecryptable video while reporting done. The CLI was unaffected because it always samples. Override needs_samples() to true on KeydbSource so every consumer samples encrypted units before resolving and a wrong keydb UK is rejected on all paths. Regression test asserts the override.
Languages
Rust
100%