From 468402364a21eeb251994995ebd746be1788a3f9 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Tue, 5 Sep 2023 17:44:56 +0200 Subject: [PATCH] openpgp-card-sequoia: rename set_user_interaction_flag to set_touch_policy --- openpgp-card-sequoia/src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openpgp-card-sequoia/src/lib.rs b/openpgp-card-sequoia/src/lib.rs index 241899a..25a9c8d 100644 --- a/openpgp-card-sequoia/src/lib.rs +++ b/openpgp-card-sequoia/src/lib.rs @@ -1104,11 +1104,12 @@ impl Card> { self.card().set_pw_status_bytes(pw_status, long) } - pub fn set_user_interaction_flag( - &mut self, - key: KeyType, - policy: TouchPolicy, - ) -> Result<(), Error> { + /// Set the touch policy for a key slot (if the card supports this + /// feature). + /// + /// Note that the current touch policy setting (if available) can be read + /// via [`Card::user_interaction_flag`]. + pub fn set_touch_policy(&mut self, key: KeyType, policy: TouchPolicy) -> Result<(), Error> { let uif = match key { KeyType::Signing => self.state.tx.state.ard().uif_pso_cds()?, KeyType::Decryption => self.state.tx.state.ard().uif_pso_dec()?,