openpgp-card-sequoia: rename set_user_interaction_flag to set_touch_policy

This commit is contained in:
Heiko Schaefer 2023-09-05 17:44:56 +02:00
parent 041228a4a2
commit 468402364a
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -1104,11 +1104,12 @@ impl Card<Admin<'_, '_>> {
self.card().set_pw_status_bytes(pw_status, long) self.card().set_pw_status_bytes(pw_status, long)
} }
pub fn set_user_interaction_flag( /// Set the touch policy for a key slot (if the card supports this
&mut self, /// feature).
key: KeyType, ///
policy: TouchPolicy, /// Note that the current touch policy setting (if available) can be read
) -> Result<(), Error> { /// via [`Card<Transaction>::user_interaction_flag`].
pub fn set_touch_policy(&mut self, key: KeyType, policy: TouchPolicy) -> Result<(), Error> {
let uif = match key { let uif = match key {
KeyType::Signing => self.state.tx.state.ard().uif_pso_cds()?, KeyType::Signing => self.state.tx.state.ard().uif_pso_cds()?,
KeyType::Decryption => self.state.tx.state.ard().uif_pso_dec()?, KeyType::Decryption => self.state.tx.state.ard().uif_pso_dec()?,