mirror of
https://github.com/freemkv/freemkv-keysources.git
synced 2026-10-07 18:13:11 +00:00
The three crates move together because they must: freemkv resolves its siblings from their git TAGS in its own CI, where keysources still wanted ureq 2, so cargo saw no conflict and the earlier split bump went green on a dependency graph the release never uses. The qa and hash-matrix workflows resolve those siblings from their dev PATHS, cargo unifies to a single ureq, and the mismatch stops compiling. Verified here the way those workflows see it: freemkv built against the sibling paths now resolves one ureq 3.4.0 and no ureq 2 anywhere. Notable API changes: AgentBuilder::new()..build() -> Config::builder()..build() + Agent .redirects(0) -> .max_redirects(0) .timeout_read(d) -> .timeout_recv_response(Some(d)) .resolver(closure) -> the Resolver trait .set(k, v) -> .header(k, v) ureq::Response -> http::Response<ureq::Body> Error::Status(code, _) -> Error::StatusCode(code) Error::Transport(_) -> fans out; matched with a catch-all Two hazards the new resolver API introduces, both handled: Agent::new_with_config compiles fine and then silently ignores a custom resolver, so the pinned addresses would be dropped and every request would go back to live DNS -- reopening the DNS-rebinding window the guards exist to close, with no symptom. Only Agent::with_parts takes a resolver, and that is what every pinned agent here uses. ResolvedSocketAddrs is a fixed 16-slot array whose push writes straight into it, so a host publishing more than 16 addresses would panic the calling thread. Truncated to the first 16. The four reply stubs used ureq::Response::new, which v3 removes; they are rebuilt with http::Response::builder over a ureq::Body, so they stay server-free unit tests.
44 lines
2.0 KiB
TOML
44 lines
2.0 KiB
TOML
[package]
|
|
name = "freemkv-keysources"
|
|
version = "1.6.2"
|
|
edition = "2024"
|
|
rust-version = "1.97"
|
|
license = "MIT"
|
|
description = "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."
|
|
repository = "https://github.com/freemkv/freemkv-keysources"
|
|
keywords = ["aacs", "blu-ray", "uhd", "decryption", "keydb"]
|
|
categories = ["multimedia"]
|
|
# OFF crates.io: depends on libfreemkv, which is now git-only (it git-deps the
|
|
# firmware crate). A crates.io crate can't carry a git dep, so keysources is
|
|
# consumed by git tag too. Clients git-tag-pin it.
|
|
publish = false
|
|
|
|
[dependencies]
|
|
# The crate provides the `KeySource` trait + `Key`/`DiscInputs` types these impls fill.
|
|
# libfreemkv is git-only now; the committed [patch.crates-io] below redirects this
|
|
# bare version req to the libfreemkv git tag (local dev overrides it to a path).
|
|
libfreemkv = "1.6"
|
|
# OnlineSource: POST disc inputs + samples to a key service over HTTP.
|
|
ureq = { version = "3", features = ["json"] }
|
|
serde_json = "1"
|
|
base64 = "0.23"
|
|
# KeydbSource::save: decompress a downloaded keydb (.zip / .gz). Same versions
|
|
# already in the resolved graph via libfreemkv — no new tree, no new HTTP stack.
|
|
flate2 = "1"
|
|
zip = { version = "8", default-features = false, features = ["deflate"] }
|
|
# Structural begin/end logging around the keyserver round-trip (never logs
|
|
# key material).
|
|
tracing = "0.1"
|
|
|
|
[profile.release]
|
|
lto = "thin"
|
|
codegen-units = 1
|
|
|
|
# libfreemkv is git-only (off crates.io). Redirect the bare `libfreemkv = "1.5"`
|
|
# req above to the git tag — committed and CI-visible. The release script
|
|
# rewrites this tag to the new version before regenerating Cargo.lock. Local dev
|
|
# overrides it with a path patch via the gitignored .cargo/config.toml (a
|
|
# config-level [patch.crates-io] wins over this manifest one for the same crate).
|
|
[patch.crates-io]
|
|
libfreemkv = { git = "https://github.com/freemkv/libfreemkv", tag = "v1.6.2" }
|