feat: 1.9.9, ssh-piv-sign works now
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -406,7 +406,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "card-cli"
|
name = "card-cli"
|
||||||
version = "1.9.8"
|
version = "1.9.9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"authenticator",
|
"authenticator",
|
||||||
"base64 0.21.7",
|
"base64 0.21.7",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "card-cli"
|
name = "card-cli"
|
||||||
version = "1.9.8"
|
version = "1.9.9"
|
||||||
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
authors = ["Hatter Jiang <jht5945@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ impl Command for CommandImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||||
warning!("It NOT works in the right way, and I do not know how to fix it now");
|
|
||||||
|
|
||||||
let namespace_opt = sub_arg_matches.value_of("namespace");
|
let namespace_opt = sub_arg_matches.value_of("namespace");
|
||||||
let namespace = match namespace_opt {
|
let namespace = match namespace_opt {
|
||||||
None => return simple_error!("Namespace required"),
|
None => return simple_error!("Namespace required"),
|
||||||
@@ -113,9 +111,9 @@ impl Command for CommandImpl {
|
|||||||
sign_message.write_string("sha512".as_bytes());
|
sign_message.write_string("sha512".as_bytes());
|
||||||
sign_message.write_string(&crate::digest::sha512_bytes(&data));
|
sign_message.write_string(&crate::digest::sha512_bytes(&data));
|
||||||
let tobe_signed_data = if ec_bit_len == 256 {
|
let tobe_signed_data = if ec_bit_len == 256 {
|
||||||
crate::digest::sha256_bytes(&signature)
|
crate::digest::sha256_bytes(&sign_message)
|
||||||
} else {
|
} else {
|
||||||
crate::digest::sha384_bytes(&signature)
|
crate::digest::sha384_bytes(&sign_message)
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(pin) = pin_opt {
|
if let Some(pin) = pin_opt {
|
||||||
|
|||||||
Reference in New Issue
Block a user