In generate_key_simple(), the algo parameter is now an Option<AlgoSimple>.
This allows uploading keys without explicitly setting the algorithm, thus leaving the card's algo setting unchanged.
This commit is contained in:
parent
02401d12f4
commit
79cfcb09c2
1 changed files with 13 additions and 6 deletions
|
@ -408,12 +408,19 @@ impl Admin<'_, '_> {
|
|||
pub fn generate_key_simple(
|
||||
&mut self,
|
||||
key_type: KeyType,
|
||||
algo: AlgoSimple,
|
||||
algo: Option<AlgoSimple>,
|
||||
) -> 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,
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue