mirror of
https://github.com/freemkv/freemkv-keysources.git
synced 2026-10-07 18:13:11 +00:00
5bf6c4875b034176eebde1aa9ef80b8360aecb78
Two disc-side reads were silently swallowed with unwrap_or(&[]): a failure reading the disc's encrypted title keys or its MKB looked identical to a disc that genuinely had none, hiding real I/O/parse errors from the operator. Log a warning (mirroring online.rs's existing pattern) before falling back to empty in both cases. Also, a stored unit key numbered 0 (an invalid CPS unit number; valid numbering is >= 1) was mapped via num.saturating_sub(1) onto idx 0, silently colliding with and shadowing a legitimate unit 1. Skip unit number 0 instead of mis-mapping it, and add a regression test.
freemkv-keysources
Pluggable AACS key sources (keydb, online key service) for
libfreemkv. Each source looks a disc up
and hands libfreemkv its terminal Unit Keys via get_unit_keys; the library
does all derivation.
License
MIT — see LICENSE.
Languages
Rust
100%