diff --git a/openpgp-card-sequoia/src/card.rs b/openpgp-card-sequoia/src/card.rs index be2a39c..6f3fd92 100644 --- a/openpgp-card-sequoia/src/card.rs +++ b/openpgp-card-sequoia/src/card.rs @@ -408,12 +408,19 @@ impl Admin<'_, '_> { pub fn generate_key_simple( &mut self, key_type: KeyType, - algo: AlgoSimple, + algo: Option, ) -> Result<(PublicKeyMaterial, KeyGenerationTime), Error> { - self.oc.card_app.generate_key_simple( - public_to_fingerprint, - key_type, - algo, - ) + match algo { + Some(algo) => self.oc.card_app.generate_key_simple( + public_to_fingerprint, + key_type, + algo, + ), + None => self.oc.card_app.generate_key( + public_to_fingerprint, + key_type, + None, + ), + } } }