v0.7.3
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -320,7 +320,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "card-cli"
|
||||
version = "1.7.2"
|
||||
version = "1.7.3"
|
||||
dependencies = [
|
||||
"authenticator",
|
||||
"base64 0.21.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "card-cli"
|
||||
version = "1.7.2"
|
||||
version = "1.7.3"
|
||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ impl Command for CommandImpl {
|
||||
if let Some((public_key_sha256, public_key_pem)) = public_key_pem(&public_key) {
|
||||
information!("{} public key sha256: {}", tag1, hex::encode(&public_key_sha256));
|
||||
information!("{} public key: {}", tag1, public_key_pem.trim());
|
||||
information!("{} public key: {}", tag1, public_key);
|
||||
if json_output {
|
||||
json.insert(format!("{}_public_key_sha256", tag2), hex::encode(&public_key_sha256));
|
||||
json.insert(format!("{}_public_key_pem", tag2), public_key_pem);
|
||||
|
||||
@@ -59,8 +59,12 @@ pub fn openpgp_card_public_key_pem(public_key: &PublicKeyMaterial) -> Option<(Ve
|
||||
PublicKeyMaterial::R(rsa_pub) => {
|
||||
Some(rsa_public_key_pem(rsa_pub.n(), rsa_pub.v()))
|
||||
}
|
||||
PublicKeyMaterial::E(ecc_pub) => {
|
||||
let ecc_pub_key_bytes_sha256 = sha256_bytes(&ecc_pub.data());
|
||||
Some((ecc_pub_key_bytes_sha256, format!("hex:{}", hex::encode(&ecc_pub.data()))))
|
||||
}
|
||||
_ => {
|
||||
warning!("Not RSA public key: {:?}", public_key);
|
||||
warning!("Unknown public key: {:?}", public_key);
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user