From f93dddf40c4eb347cca9778f012b0e9a04f255a7 Mon Sep 17 00:00:00 2001 From: Matthew Jackson <1085847+MattJackson@users.noreply.github.com> Date: Fri, 3 Jul 2026 20:36:50 -0700 Subject: [PATCH] keydb: adopt corrected mk_from_dk (2-arg), reviving the DK->MK fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libfreemkv's AACS work changes mk_from_dk from (dk, mkb, vid) to (dk, mkb) — the VID enters at the VUK step, not the MK step. Adopt the 2-arg call so the DK pool is tried unconditionally (no longer gated on a VID being present), matching libfreemkv. Without this keysources fails to compile against the new libfreemkv. (Equivalent to the stranded b80d4cb; applied directly since that branch had diverged surrounding context.) --- src/keydb.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/keydb.rs b/src/keydb.rs index 6854b35..32ccce9 100644 --- a/src/keydb.rs +++ b/src/keydb.rs @@ -207,7 +207,9 @@ impl KeydbSource { .media_key .map(MediaKey) .or_else(|| mk_from_pk(&db.processing_keys, mkb).ok()) - .or_else(|| vid.and_then(|v| mk_from_dk(&db.device_keys, mkb, v).ok())); + // DK pool: the real Subset-Difference MKB walk. No VID at the MK + // step (it enters at the VUK step below); the VID guard follows. + .or_else(|| mk_from_dk(&db.device_keys, mkb).ok()); match (mk, vid) { (Some(mk), Some(vid)) => uk_from_vuk(vuk_from_mk(mk, vid), enc_title_keys), // Locked VID-per-path rule: an MK with no VID cannot derive.