Implement --generate command

Includes logic to help users manage their keys:

- If the key is using a default PIN, we require the user to change it.
- We set the PUK equal to the PIN so the user doesn't need to remember
  them separately.
- We migrate the default management key to a new PIN-protected key.
This commit is contained in:
Jack Grigg
2021-01-03 19:47:10 +00:00
parent eedf9fa997
commit 850f96cd2c
7 changed files with 341 additions and 4 deletions
+5
View File
@@ -14,13 +14,18 @@ edition = "2018"
age-core = "0.5"
age-plugin = "0.0"
bech32 = "0.8"
chrono = "0.4"
console = "0.14"
dialoguer = "0.8"
elliptic-curve = "0.8"
env_logger = "0.8"
gumdrop = "0.8"
hex = "0.4"
log = "0.4"
p256 = "0.7"
rand = "0.8"
sha2 = "0.9"
x509 = "0.2"
x509-parser = "0.9"
yubikey-piv = { version = "0.3", features = ["untested"] }