openpgp-card-sequoia: move all uif_* getters into uif()
This commit is contained in:
parent
d55980cef6
commit
736199a8de
1 changed files with 11 additions and 14 deletions
|
@ -539,20 +539,17 @@ impl<'a> Card<Transaction<'a>> {
|
||||||
self.state.ard.key_information()
|
self.state.ard.key_information()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn uif_signing(&self) -> Result<Option<UserInteractionFlag>, Error> {
|
pub fn uif(&self, key_type: KeyType) -> Result<Option<UserInteractionFlag>, Error> {
|
||||||
self.state.ard.uif_pso_cds()
|
match key_type {
|
||||||
}
|
KeyType::Signing => self.state.ard.uif_pso_cds(),
|
||||||
|
KeyType::Decryption => self.state.ard.uif_pso_dec(),
|
||||||
pub fn uif_decryption(&self) -> Result<Option<UserInteractionFlag>, Error> {
|
KeyType::Authentication => self.state.ard.uif_pso_aut(),
|
||||||
self.state.ard.uif_pso_dec()
|
KeyType::Attestation => self.state.ard.uif_attestation(),
|
||||||
}
|
_ => Err(Error::UnsupportedFeature(format!(
|
||||||
|
"Can't get UIF for key_type {:?}",
|
||||||
pub fn uif_authentication(&self) -> Result<Option<UserInteractionFlag>, Error> {
|
key_type,
|
||||||
self.state.ard.uif_pso_aut()
|
))),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn uif_attestation(&self) -> Result<Option<UserInteractionFlag>, Error> {
|
|
||||||
self.state.ard.uif_attestation()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- optional private DOs (0101 - 0104) ---
|
// --- optional private DOs (0101 - 0104) ---
|
||||||
|
|
Loading…
Reference in a new issue