[Fix] Version Bump, Checks, tests CQ
Some checks failed
CI / checks (push) Failing after 2m54s

This commit is contained in:
Alex Emmet 2026-08-13 21:18:55 +02:00
commit e939714557
34 changed files with 5752 additions and 628 deletions

View file

@ -1,12 +1,12 @@
[package]
name = "mtp-files"
version = "0.2.0"
version = "0.3.0"
edition = "2024"
[dependencies]
# Only the plain key types (`Keyring`, `PublicKeyBundle`, `CryptoError`) are
# needed here; those are always compiled, so no crypto features are required.
mtp-crypto = { version = "0.2.0", path = "../crypto", default-features = false, features = ["chacha20poly1305", "hkdf"] }
mtp-crypto = { version = "0.3.0", path = "../crypto", default-features = false, features = ["chacha20poly1305", "hkdf"] }
argon2 = "0.5"
rand = "0.10.2"
@ -16,3 +16,8 @@ zeroize = "1.9"
[features]
# Plain private-key files are only needed by migration tooling and tests.
raw = []
[dev-dependencies]
# Enable suite implementations for bundle-loading tests without adding them to
# the normal files-library dependency surface.
mtp-crypto = { version = "0.3.0", path = "../crypto", features = ["mlkem-tls"] }

View file

@ -347,7 +347,7 @@ mod tests {
#[test]
fn bundle_save_load_roundtrip() -> Result<(), Box<dyn std::error::Error>> {
let path = temp_path(BUNDLE_EXTENSION);
let bundle = sample_keyring().public_key_bundle();
let bundle = Keyring::generate().public_key_bundle();
save_public_key_bundle(&bundle, &path)?;
let loaded = load_public_key_bundle(&path)?;
assert_eq!(bundle.as_bytes(), loaded.as_bytes());
@ -358,7 +358,8 @@ mod tests {
#[test]
fn loading_bundle_as_keyring_fails_on_magic() -> Result<(), Box<dyn std::error::Error>> {
let path = temp_path(BUNDLE_EXTENSION);
save_public_key_bundle(&sample_keyring().public_key_bundle(), &path)?;
let bundle = Keyring::generate().public_key_bundle();
save_public_key_bundle(&bundle, &path)?;
assert!(matches!(
load_keyring(&path, b"passphrase"),
Err(FileError::BadMagic { .. })