Add reset_user_pin() fn for Open and for Admin, as well as set_resetting_code() to Admin.
This commit is contained in:
parent
2c0c19502f
commit
3407cd3a39
1 changed files with 20 additions and 0 deletions
|
@ -113,6 +113,15 @@ impl Open {
|
||||||
self.card_app.change_pw1(old, new)
|
self.card_app.change_pw1(old, new)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn reset_user_pin(
|
||||||
|
&mut self,
|
||||||
|
rst: &str,
|
||||||
|
new: &str,
|
||||||
|
) -> Result<Response, Error> {
|
||||||
|
self.card_app
|
||||||
|
.reset_retry_counter_pw1(new.into(), Some(rst.into()))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn change_admin_pin(
|
pub fn change_admin_pin(
|
||||||
&mut self,
|
&mut self,
|
||||||
old: &str,
|
old: &str,
|
||||||
|
@ -364,6 +373,17 @@ impl Admin<'_> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn set_resetting_code(
|
||||||
|
&mut self,
|
||||||
|
pin: &str,
|
||||||
|
) -> Result<Response, Error> {
|
||||||
|
self.oc.card_app.set_resetting_code(pin.into())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn reset_user_pin(&mut self, new: &str) -> Result<Response, Error> {
|
||||||
|
self.oc.card_app.reset_retry_counter_pw1(new.into(), None)
|
||||||
|
}
|
||||||
|
|
||||||
/// Upload a ValidErasedKeyAmalgamation to the card as a specific KeyType.
|
/// Upload a ValidErasedKeyAmalgamation to the card as a specific KeyType.
|
||||||
///
|
///
|
||||||
/// (The caller needs to make sure that `vka` is suitable as `key_type`)
|
/// (The caller needs to make sure that `vka` is suitable as `key_type`)
|
||||||
|
|
Loading…
Reference in a new issue