feat: update dependencies

This commit is contained in:
2025-06-30 00:16:02 +08:00
parent 3647515321
commit 421f2e2ffe
3 changed files with 101 additions and 16 deletions

99
Cargo.lock generated
View File

@@ -149,6 +149,18 @@ version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
[[package]]
name = "argon2"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072"
dependencies = [
"base64ct",
"blake2",
"cpufeatures",
"password-hash",
]
[[package]] [[package]]
name = "arrayvec" name = "arrayvec"
version = "0.5.2" version = "0.5.2"
@@ -454,6 +466,15 @@ dependencies = [
"wyz", "wyz",
] ]
[[package]]
name = "blake2"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
dependencies = [
"digest 0.10.7",
]
[[package]] [[package]]
name = "blanket" name = "blanket"
version = "0.3.0" version = "0.3.0"
@@ -574,6 +595,15 @@ dependencies = [
"pkg-config", "pkg-config",
] ]
[[package]]
name = "card-backend"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd3ee3a298842065dc489180c34a4fe4bbbb8643bb422009d79558a099fb42e5"
dependencies = [
"thiserror 1.0.69",
]
[[package]] [[package]]
name = "card-cli" name = "card-cli"
version = "1.13.16" version = "1.13.16"
@@ -591,7 +621,7 @@ dependencies = [
"external-command-rs", "external-command-rs",
"hex", "hex",
"jwt", "jwt",
"openpgp-card", "openpgp-card 0.3.7",
"openpgp-card-pcsc", "openpgp-card-pcsc",
"openpgp-card-sequoia", "openpgp-card-sequoia",
"openssl", "openssl",
@@ -610,7 +640,7 @@ dependencies = [
"rust_util", "rust_util",
"secrecy 0.10.3", "secrecy 0.10.3",
"security-framework 3.2.0", "security-framework 3.2.0",
"sequoia-openpgp", "sequoia-openpgp 2.0.0",
"serde", "serde",
"serde_json", "serde_json",
"sha1", "sha1",
@@ -2571,6 +2601,20 @@ dependencies = [
"thiserror 1.0.69", "thiserror 1.0.69",
] ]
[[package]]
name = "openpgp-card"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4e4e4146cf765e416a6c73e6bef6a4aa4cb12a76d9ef24c8c170eba4e4384ca"
dependencies = [
"card-backend",
"chrono",
"hex-slice",
"log",
"nom 7.1.3",
"thiserror 1.0.69",
]
[[package]] [[package]]
name = "openpgp-card-pcsc" name = "openpgp-card-pcsc"
version = "0.3.1" version = "0.3.1"
@@ -2579,22 +2623,24 @@ checksum = "fb6ccdfe0c0b8535e83310178b725e8ee0ff676d73b649cf3e56369185da6a6b"
dependencies = [ dependencies = [
"iso7816-tlv", "iso7816-tlv",
"log", "log",
"openpgp-card", "openpgp-card 0.3.7",
"pcsc", "pcsc",
] ]
[[package]] [[package]]
name = "openpgp-card-sequoia" name = "openpgp-card-sequoia"
version = "0.1.5" version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bf3707d61f97a41d811b2f1b7a20c894324c284f41ebf8374072182f2252f7c" checksum = "0835400374822b27054b7a6606770f4a48b9255ad800a098f1d242d8695b4f22"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"card-backend",
"chrono", "chrono",
"log", "log",
"openpgp-card", "openpgp-card 0.4.2",
"rsa 0.8.2", "rsa 0.8.2",
"sequoia-openpgp", "sequoia-openpgp 1.22.0",
"sha2 0.10.9",
"thiserror 1.0.69", "thiserror 1.0.69",
] ]
@@ -2762,6 +2808,17 @@ dependencies = [
"windows-targets 0.52.6", "windows-targets 0.52.6",
] ]
[[package]]
name = "password-hash"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166"
dependencies = [
"base64ct",
"rand_core 0.6.4",
"subtle",
]
[[package]] [[package]]
name = "pbkdf2" name = "pbkdf2"
version = "0.8.0" version = "0.8.0"
@@ -3715,6 +3772,34 @@ dependencies = [
"xxhash-rust", "xxhash-rust",
] ]
[[package]]
name = "sequoia-openpgp"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "015e5fc3d023418b9db98ca9a7f3e90b305872eeafe5ca45c5c32b5eb335c1e8"
dependencies = [
"anyhow",
"argon2",
"base64 0.22.1",
"buffered-reader",
"bzip2",
"chrono",
"dyn-clone",
"flate2",
"getrandom 0.2.16",
"idna",
"lalrpop",
"lalrpop-util",
"libc",
"memsec",
"nettle",
"regex",
"regex-syntax",
"sha1collisiondetection",
"thiserror 2.0.12",
"xxhash-rust",
]
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.219" version = "1.0.219"

View File

@@ -26,8 +26,8 @@ serde_json = "1.0"
hex = "0.4" hex = "0.4"
openpgp-card = "0.3" openpgp-card = "0.3"
openpgp-card-pcsc = "0.3" openpgp-card-pcsc = "0.3"
openpgp-card-sequoia = { version = "0.1", optional = true } openpgp-card-sequoia = { version = "0.2", optional = true }
sequoia-openpgp = { version = "1.0", optional = true } sequoia-openpgp = { version = "2.0", optional = true }
chrono = "0.4" chrono = "0.4"
simpledateformat = "0.1" simpledateformat = "0.1"
ring = "0.17" ring = "0.17"

View File

@@ -1,5 +1,3 @@
use std::ops::Deref;
use chrono::{DateTime, Local}; use chrono::{DateTime, Local};
use clap::{App, Arg, ArgMatches, SubCommand}; use clap::{App, Arg, ArgMatches, SubCommand};
use rust_util::util_clap::{Command, CommandError}; use rust_util::util_clap::{Command, CommandError};
@@ -151,7 +149,7 @@ impl Command for CommandImpl {
debugging!("Found PKESK: {:?}", pkesk); debugging!("Found PKESK: {:?}", pkesk);
match pkesk { match pkesk {
PKESK::V3(pkesk3) => { PKESK::V3(pkesk3) => {
information!("Found public key encrypted session key, key ID: {}, alog: {}", pkesk3.recipient(), pkesk3.pk_algo()); information!("Found public key encrypted session key, key ID: {:?}, alog: {}", pkesk3.recipient(), pkesk3.pk_algo());
} }
unknown => warning!("Unknown PKESK: {:?}", unknown), unknown => warning!("Unknown PKESK: {:?}", unknown),
} }
@@ -162,19 +160,21 @@ impl Command for CommandImpl {
Packet::SEIP(seip) => { Packet::SEIP(seip) => {
debugging!("Found SEIP: {:?}", seip); debugging!("Found SEIP: {:?}", seip);
match seip { match seip {
SEIP::V1(seip1) => match seip1.deref().body() { SEIP::V1(seip1) => match seip1.body() {
Body::Processed(b) | Body::Unprocessed(b) => information!("Found encrypted data, len: {} byte(s)", b.len()), Body::Processed(b) | Body::Unprocessed(b) => information!("Found encrypted data, len: {} byte(s)", b.len()),
Body::Structured(b) => information!("Found encrypted data packages, len: {}", b.len()), Body::Structured(b) => information!("Found encrypted data packages, len: {}", b.len()),
} }
SEIP::V2(seip2) => match seip2.body() {
Body::Processed(b) | Body::Unprocessed(b) => information!("Found encrypted data, len: {} byte(s)", b.len()),
Body::Structured(b) => information!("Found encrypted data packages, len: {}", b.len()),
}
_ => {}
} }
} }
#[allow(deprecated)] #[allow(deprecated)]
Packet::MDC(mdc) => { Packet::MDC(mdc) => {
information!("Found MDC: {:?}", mdc); information!("Found MDC: {:?}", mdc);
} }
Packet::AED(aed) => {
information!("Found AED: {:?}", aed);
}
Packet::Unknown(unknown) => { Packet::Unknown(unknown) => {
warning!("Found unknown: {:?}", unknown); warning!("Found unknown: {:?}", unknown);
} }