Add comment about verifying the admin PIN before attempting a PIN-change (and a link to a yubico developer blog article detailing a potential pitfall of *not* doing that check)
This commit is contained in:
parent
cd40e2bae4
commit
0694e084e4
1 changed files with 3 additions and 0 deletions
|
@ -286,6 +286,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
|
||||
// verify pin
|
||||
open.verify_admin(&admin_pin1)?;
|
||||
// (Verifying the PIN here fixes this class of problems:
|
||||
// https://developers.yubico.com/PGP/PGP_PIN_Change_Behavior.html
|
||||
// It is also just generally more user friendly than failing later)
|
||||
println!("PIN was accepted by the card.\n");
|
||||
|
||||
let pin_new = match admin_pin_new {
|
||||
|
|
Loading…
Reference in a new issue