Remove/adjust debug prints
This commit is contained in:
parent
ca5dd61001
commit
e9f1256309
2 changed files with 2 additions and 8 deletions
|
@ -106,8 +106,6 @@ pub fn public_key_material_to_key(
|
||||||
key::UnspecifiedRole,
|
key::UnspecifiedRole,
|
||||||
> = Key4::import_public_ed25519(&ecc.data, time)?;
|
> = Key4::import_public_ed25519(&ecc.data, time)?;
|
||||||
|
|
||||||
println!("k4 {:?}", k4);
|
|
||||||
|
|
||||||
Ok(Key::from(k4))
|
Ok(Key::from(k4))
|
||||||
} else {
|
} else {
|
||||||
// ECDSA
|
// ECDSA
|
||||||
|
@ -133,8 +131,6 @@ pub fn public_key_material_to_key(
|
||||||
&ecc.data, None, None, time,
|
&ecc.data, None, None, time,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
println!("k4 {:?}", k4);
|
|
||||||
|
|
||||||
Ok(Key::from(k4))
|
Ok(Key::from(k4))
|
||||||
} else {
|
} else {
|
||||||
// FIXME: just defining `hash` and `sym` is not
|
// FIXME: just defining `hash` and `sym` is not
|
||||||
|
|
|
@ -33,11 +33,9 @@ pub(crate) fn gen_key_with_metadata(
|
||||||
) -> Result<(PublicKeyMaterial, u32), OpenpgpCardError> {
|
) -> Result<(PublicKeyMaterial, u32), OpenpgpCardError> {
|
||||||
// set algo on card if it's Some
|
// set algo on card if it's Some
|
||||||
if let Some(algo) = algo {
|
if let Some(algo) = algo {
|
||||||
println!("set algo {:?}", algo);
|
|
||||||
card_app
|
card_app
|
||||||
.set_algorithm_attributes(key_type, algo)?
|
.set_algorithm_attributes(key_type, algo)?
|
||||||
.check_ok()?;
|
.check_ok()?;
|
||||||
println!("set algo done");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// algo
|
// algo
|
||||||
|
@ -87,7 +85,7 @@ fn tlv_to_pubkey(tlv: &Tlv, algo: &Algo) -> Result<PublicKeyMaterial> {
|
||||||
}
|
}
|
||||||
(None, None, Some(ec)) => {
|
(None, None, Some(ec)) => {
|
||||||
let data = ec.serialize();
|
let data = ec.serialize();
|
||||||
println!("EC --- len {}, data {:x?}", data.len(), data);
|
log::trace!("EC --- len {}, data {:x?}", data.len(), data);
|
||||||
|
|
||||||
Ok(PublicKeyMaterial::E(EccPub {
|
Ok(PublicKeyMaterial::E(EccPub {
|
||||||
data,
|
data,
|
||||||
|
@ -105,7 +103,7 @@ pub(crate) fn gen_key(
|
||||||
card_app: &mut CardApp,
|
card_app: &mut CardApp,
|
||||||
key_type: KeyType,
|
key_type: KeyType,
|
||||||
) -> Result<Tlv, OpenpgpCardError> {
|
) -> Result<Tlv, OpenpgpCardError> {
|
||||||
println!("gen key for {:?}", key_type);
|
println!(" Generate subkey for {:?}", key_type);
|
||||||
|
|
||||||
// generate key
|
// generate key
|
||||||
let crt = get_crt(key_type)?;
|
let crt = get_crt(key_type)?;
|
||||||
|
|
Loading…
Reference in a new issue