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(
|
pub fn generate_key_simple(
|
||||||
&mut self,
|
&mut self,
|
||||||
key_type: KeyType,
|
key_type: KeyType,
|
||||||
algo: AlgoSimple,
|
algo: Option<AlgoSimple>,
|
||||||
) -> Result<(PublicKeyMaterial, KeyGenerationTime), Error> {
|
) -> Result<(PublicKeyMaterial, KeyGenerationTime), Error> {
|
||||||
self.oc.card_app.generate_key_simple(
|
match algo {
|
||||||
public_to_fingerprint,
|
Some(algo) => self.oc.card_app.generate_key_simple(
|
||||||
key_type,
|
public_to_fingerprint,
|
||||||
algo,
|
key_type,
|
||||||
)
|
algo,
|
||||||
|
),
|
||||||
|
None => self.oc.card_app.generate_key(
|
||||||
|
public_to_fingerprint,
|
||||||
|
key_type,
|
||||||
|
None,
|
||||||
|
),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue