dialoguer 0.10
This commit is contained in:
Generated
+2
-3
@@ -490,12 +490,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dialoguer"
|
name = "dialoguer"
|
||||||
version = "0.9.0"
|
version = "0.10.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "61579ada4ec0c6031cfac3f86fdba0d195a7ebeb5e36693bd53cb5999a25beeb"
|
checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"console",
|
"console",
|
||||||
"lazy_static",
|
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ age-plugin = "0.4"
|
|||||||
base64 = "0.20"
|
base64 = "0.20"
|
||||||
bech32 = "0.9"
|
bech32 = "0.9"
|
||||||
console = { version = "0.15", default-features = false }
|
console = { version = "0.15", default-features = false }
|
||||||
dialoguer = { version = "0.9", default-features = false, features = ["password"] }
|
dialoguer = { version = "0.10", default-features = false, features = ["password"] }
|
||||||
env_logger = "0.10"
|
env_logger = "0.10"
|
||||||
gumdrop = "0.8"
|
gumdrop = "0.8"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ pub(crate) fn manage(yubikey: &mut YubiKey) -> Result<(), Error> {
|
|||||||
yubikey_serial = yubikey.serial().to_string(),
|
yubikey_serial = yubikey.serial().to_string(),
|
||||||
default_pin = DEFAULT_PIN,
|
default_pin = DEFAULT_PIN,
|
||||||
))
|
))
|
||||||
|
.report(true)
|
||||||
.interact()?;
|
.interact()?;
|
||||||
yubikey.verify_pin(pin.as_bytes())?;
|
yubikey.verify_pin(pin.as_bytes())?;
|
||||||
|
|
||||||
|
|||||||
@@ -372,6 +372,7 @@ fn main() -> Result<(), Error> {
|
|||||||
.with_prompt(fl!("cli-setup-select-yk"))
|
.with_prompt(fl!("cli-setup-select-yk"))
|
||||||
.items(&reader_names)
|
.items(&reader_names)
|
||||||
.default(0)
|
.default(0)
|
||||||
|
.report(true)
|
||||||
.interact_opt()?
|
.interact_opt()?
|
||||||
{
|
{
|
||||||
Some(yk) => readers_list[yk].open()?,
|
Some(yk) => readers_list[yk].open()?,
|
||||||
@@ -430,6 +431,7 @@ fn main() -> Result<(), Error> {
|
|||||||
.with_prompt(fl!("cli-setup-select-slot"))
|
.with_prompt(fl!("cli-setup-select-slot"))
|
||||||
.items(&slots)
|
.items(&slots)
|
||||||
.default(0)
|
.default(0)
|
||||||
|
.report(true)
|
||||||
.interact_opt()?
|
.interact_opt()?
|
||||||
{
|
{
|
||||||
Some(slot) => {
|
Some(slot) => {
|
||||||
@@ -447,6 +449,7 @@ fn main() -> Result<(), Error> {
|
|||||||
|
|
||||||
if Confirm::new()
|
if Confirm::new()
|
||||||
.with_prompt(fl!("cli-setup-use-existing", slot_index = slot_index))
|
.with_prompt(fl!("cli-setup-use-existing", slot_index = slot_index))
|
||||||
|
.report(true)
|
||||||
.interact()?
|
.interact()?
|
||||||
{
|
{
|
||||||
let stub = key::Stub::new(yubikey.serial(), slot, &recipient);
|
let stub = key::Stub::new(yubikey.serial(), slot, &recipient);
|
||||||
@@ -466,6 +469,7 @@ fn main() -> Result<(), Error> {
|
|||||||
flags.name.as_deref().unwrap_or("age identity TAG_HEX")
|
flags.name.as_deref().unwrap_or("age identity TAG_HEX")
|
||||||
))
|
))
|
||||||
.allow_empty(true)
|
.allow_empty(true)
|
||||||
|
.report(true)
|
||||||
.interact_text()?;
|
.interact_text()?;
|
||||||
|
|
||||||
let pin_policy = match Select::new()
|
let pin_policy = match Select::new()
|
||||||
@@ -483,6 +487,7 @@ fn main() -> Result<(), Error> {
|
|||||||
})
|
})
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
|
.report(true)
|
||||||
.interact_opt()?
|
.interact_opt()?
|
||||||
{
|
{
|
||||||
Some(0) => PinPolicy::Always,
|
Some(0) => PinPolicy::Always,
|
||||||
@@ -507,6 +512,7 @@ fn main() -> Result<(), Error> {
|
|||||||
})
|
})
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
|
.report(true)
|
||||||
.interact_opt()?
|
.interact_opt()?
|
||||||
{
|
{
|
||||||
Some(0) => TouchPolicy::Always,
|
Some(0) => TouchPolicy::Always,
|
||||||
@@ -518,6 +524,7 @@ fn main() -> Result<(), Error> {
|
|||||||
|
|
||||||
if Confirm::new()
|
if Confirm::new()
|
||||||
.with_prompt(fl!("cli-setup-generate-new", slot_index = slot_index))
|
.with_prompt(fl!("cli-setup-generate-new", slot_index = slot_index))
|
||||||
|
.report(true)
|
||||||
.interact()?
|
.interact()?
|
||||||
{
|
{
|
||||||
eprintln!();
|
eprintln!();
|
||||||
@@ -545,6 +552,7 @@ fn main() -> Result<(), Error> {
|
|||||||
"age-yubikey-identity-{}.txt",
|
"age-yubikey-identity-{}.txt",
|
||||||
hex::encode(stub.tag)
|
hex::encode(stub.tag)
|
||||||
))
|
))
|
||||||
|
.report(true)
|
||||||
.interact_text()?;
|
.interact_text()?;
|
||||||
|
|
||||||
let mut file = match OpenOptions::new()
|
let mut file = match OpenOptions::new()
|
||||||
@@ -556,6 +564,7 @@ fn main() -> Result<(), Error> {
|
|||||||
Err(e) if e.kind() == io::ErrorKind::AlreadyExists => {
|
Err(e) if e.kind() == io::ErrorKind::AlreadyExists => {
|
||||||
if Confirm::new()
|
if Confirm::new()
|
||||||
.with_prompt(fl!("cli-setup-identity-file-exists"))
|
.with_prompt(fl!("cli-setup-identity-file-exists"))
|
||||||
|
.report(true)
|
||||||
.interact()?
|
.interact()?
|
||||||
{
|
{
|
||||||
File::create(&file_name)?
|
File::create(&file_name)?
|
||||||
|
|||||||
Reference in New Issue
Block a user