mirror of
https://github.com/freemkv/freemkv-unlock.git
synced 2026-10-07 18:13:11 +00:00
50205a0286a88c77a1dcc6f3f2f676fee6cd7afc
`dtolnay/rust-toolchain` is not a dependency in the sense Dependabot means: it is versioned by the Rust release it installs, and the tag we pin is the toolchain CI is pinned to on purpose — precommit.sh runs the same one locally, so a lint that passes on a developer's newer default cannot pass CI by accident. Read as semver, those tags produced a 1.97.0 -> 1.100.0 proposal, a Rust version that does not exist. Every such PR 404s on toolchain download across all eight repos and regenerates weekly: eight permanently-red PRs that promote.yml then has to special-case when it decides whether dev is green. freemkv already carries this ignore; this is the same block in the other seven, so the fleet stays uniform. Bumping the toolchain stays a deliberate, all-eight-repos change made by hand together with precommit.sh.
freemkv-unlock
The unlock layer for the freemkv toolchain.
An unlocker removes a drive-level bus-encryption barrier so the drive serves readable (de-bus'd / de-scrambled) sectors. Content-key decryption is a separate concern — the consumer's job.
This crate defines the Unlocker contract and a generic SCSI transport
contract, and holds the self-contained unlocker modules. The consumer
(libfreemkv) depends on this crate and
dispatches through all_unlockers(); it never names an individual unlocker, and
clients of libfreemkv are oblivious to unlockers entirely (as they are to the
SCSI layer).
use freemkv_unlock::UnlockError;
// Drive-prep: try each unlocker's feature unlock until one claims the drive.
// `NotApplicable` means "not this unlocker's drive" — move on; a transport
// error means a dead bus — abort. `unlock_bus` follows the same contract for
// removing per-disc bus encryption.
for u in freemkv_unlock::all_unlockers() {
match u.unlock_features(&mut scsi, &ctx) {
Ok(unlocked) => return Ok(unlocked),
Err(UnlockError::NotApplicable) => continue,
Err(e) => return Err(e),
}
}
To remove an unlocker, delete its module directory and its one line in
all_unlockers() — nothing else changes.
License: MIT.
Languages
Rust
100%