diff --git a/openpgp-card-sequoia/src/card.rs b/openpgp-card-sequoia/src/card.rs index 22227ff..8262c4b 100644 --- a/openpgp-card-sequoia/src/card.rs +++ b/openpgp-card-sequoia/src/card.rs @@ -113,6 +113,15 @@ impl Open { self.card_app.change_pw1(old, new) } + pub fn reset_user_pin( + &mut self, + rst: &str, + new: &str, + ) -> Result { + self.card_app + .reset_retry_counter_pw1(new.into(), Some(rst.into())) + } + pub fn change_admin_pin( &mut self, old: &str, @@ -364,6 +373,17 @@ impl Admin<'_> { } } + pub fn set_resetting_code( + &mut self, + pin: &str, + ) -> Result { + self.oc.card_app.set_resetting_code(pin.into()) + } + + pub fn reset_user_pin(&mut self, new: &str) -> Result { + self.oc.card_app.reset_retry_counter_pw1(new.into(), None) + } + /// Upload a ValidErasedKeyAmalgamation to the card as a specific KeyType. /// /// (The caller needs to make sure that `vka` is suitable as `key_type`)