feat: v1.0.2
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -292,7 +292,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "card-cli"
|
name = "card-cli"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"authenticator",
|
"authenticator",
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "card-cli"
|
name = "card-cli"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
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 openssl::bn::BigNum;
|
use openssl::bn::BigNum;
|
||||||
@@ -6,7 +8,7 @@ use pem::Pem;
|
|||||||
use rust_util::util_clap::{Command, CommandError};
|
use rust_util::util_clap::{Command, CommandError};
|
||||||
use sequoia_openpgp::crypto::mpi::PublicKey;
|
use sequoia_openpgp::crypto::mpi::PublicKey;
|
||||||
use sequoia_openpgp::Packet;
|
use sequoia_openpgp::Packet;
|
||||||
use sequoia_openpgp::packet::{Key, Signature};
|
use sequoia_openpgp::packet::{Body, Key, PKESK, SEIP, Signature};
|
||||||
use sequoia_openpgp::packet::signature::subpacket::{SubpacketTag, SubpacketValue};
|
use sequoia_openpgp::packet::signature::subpacket::{SubpacketTag, SubpacketValue};
|
||||||
use sequoia_openpgp::parse::{PacketParser, PacketParserResult};
|
use sequoia_openpgp::parse::{PacketParser, PacketParserResult};
|
||||||
use sequoia_openpgp::parse::Parse;
|
use sequoia_openpgp::parse::Parse;
|
||||||
@@ -146,13 +148,25 @@ impl Command for CommandImpl {
|
|||||||
information!("Found compressed data: {:?}", compressed_data);
|
information!("Found compressed data: {:?}", compressed_data);
|
||||||
}
|
}
|
||||||
Packet::PKESK(pkesk) => {
|
Packet::PKESK(pkesk) => {
|
||||||
information!("Found PKESK: {:?}", pkesk);
|
debugging!("Found PKESK: {:?}", pkesk);
|
||||||
|
match pkesk {
|
||||||
|
PKESK::V3(pkesk3) => {
|
||||||
|
information!("Found public key encrypted session key, key ID: {}, alog: {}", pkesk3.recipient(), pkesk3.pk_algo());
|
||||||
|
}
|
||||||
|
unknown => warning!("Unknown PKESK: {:?}", unknown),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Packet::SKESK(skesk) => {
|
Packet::SKESK(skesk) => {
|
||||||
information!("Found SKESK: {:?}", skesk);
|
information!("Found SKESK: {:?}", skesk);
|
||||||
}
|
}
|
||||||
Packet::SEIP(seip) => {
|
Packet::SEIP(seip) => {
|
||||||
information!("Found SEIP: {:?}", seip);
|
debugging!("Found SEIP: {:?}", seip);
|
||||||
|
match seip {
|
||||||
|
SEIP::V1(seip1) => match seip1.deref().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()),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Packet::MDC(mdc) => {
|
Packet::MDC(mdc) => {
|
||||||
information!("Found MDC: {:?}", mdc);
|
information!("Found MDC: {:?}", mdc);
|
||||||
|
|||||||
Reference in New Issue
Block a user