Move debug prints for key generation from keys.rs to tests.rs

This commit is contained in:
Heiko Schaefer 2021-08-25 21:18:13 +02:00
parent 786515a7f4
commit c6ba204293
2 changed files with 3 additions and 2 deletions

View file

@ -216,6 +216,7 @@ pub fn test_keygen(
let alg = AlgoSimple::from(algo); let alg = AlgoSimple::from(algo);
println!(" Generate subkey for Signing");
let (pkm, ts) = let (pkm, ts) =
ca.generate_key_simple(public_to_fingerprint, KeyType::Signing, alg)?; ca.generate_key_simple(public_to_fingerprint, KeyType::Signing, alg)?;
let key_sig = public_key_material_to_key( let key_sig = public_key_material_to_key(
@ -224,6 +225,7 @@ pub fn test_keygen(
Timestamp::from(ts).into(), Timestamp::from(ts).into(),
)?; )?;
println!(" Generate subkey for Decryption");
let (pkm, ts) = ca.generate_key_simple( let (pkm, ts) = ca.generate_key_simple(
public_to_fingerprint, public_to_fingerprint,
KeyType::Decryption, KeyType::Decryption,
@ -235,6 +237,7 @@ pub fn test_keygen(
Timestamp::from(ts).into(), Timestamp::from(ts).into(),
)?; )?;
println!(" Generate subkey for Authentication");
let (pkm, ts) = ca.generate_key_simple( let (pkm, ts) = ca.generate_key_simple(
public_to_fingerprint, public_to_fingerprint,
KeyType::Authentication, KeyType::Authentication,

View file

@ -101,8 +101,6 @@ 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!(" Generate subkey for {:?}", key_type);
// generate key // generate key
let crt = get_crt(key_type)?; let crt = get_crt(key_type)?;
let gen_key_cmd = commands::gen_key(crt.serialize().to_vec()); let gen_key_cmd = commands::gen_key(crt.serialize().to_vec());