d-e-s-o / nitrocli

A command line tool for interacting with Nitrokey devices.
30 stars 10 forks source link

Add --only-aes-key option to reset command #149

Closed robinkrahl closed 3 years ago

robinkrahl commented 3 years ago

This patch adds an --only-aes-key option to the reset command to only build a new AES key without performing a full factory reset.

Fixes #69.


Unfortunately, I can’t get the new unit test to work. I get a Wrong Password error for the reset call. But if I manually execute the command, it’s working fine. Can you confirm this problem? Do you see the reason for the error?

robinkrahl commented 3 years ago

Nevermind, applying the same workaround as for the regular password reset helped.

d-e-s-o commented 3 years ago

Thanks for the pull request, Robin! I'll take a closer look at this and your other work later this week. Running a bit thing right now.

d-e-s-o commented 3 years ago

Great work! Merged this one, too, but I am a bit confused by your usage of "admin PIN" in the test. I think you meant user PIN and changed it, but perhaps I am missing something.

robinkrahl commented 3 years ago

You’re totally right. I started out using the admin PIN before I realized that we need the user PIN to enable the PWS and then forgot to fix the comment. Thanks!