Nitrokey / opcard-rs

OpenPGP card implementation
49 stars 1 forks source link

Initialization: Check that pins don't exists before calling init_pins. #165

Closed sosthene-nitrokey closed 1 year ago

sosthene-nitrokey commented 1 year ago

This helps prevent spontaneous reset of the pins (which leads to user data loss) if the state somehow looks empty, but the pins are here. It might be relevant since the state can be stored on a different storage than the pins.

For example such a check would have prevented: https://github.com/Nitrokey/nitrokey-3-firmware/issues/298