diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-03-26 09:00:32 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-03-26 09:00:32 +0100 |
commit | 5b9770d6769a30fd1ecd7cb806c9997bdd3b6d7c (patch) | |
tree | 6dcff2504d53e5cc69b4f87eca6b1231228f1485 /tool/src/commands/key.rs | |
parent | 471f7fdbeec151b8505142ad2ee9124d95dbebb7 (diff) |
tool: Read passwords from the tty.
- Fixes #24.
Diffstat (limited to 'tool/src/commands/key.rs')
-rw-r--r-- | tool/src/commands/key.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/src/commands/key.rs b/tool/src/commands/key.rs index a1c9777b..91b2d941 100644 --- a/tool/src/commands/key.rs +++ b/tool/src/commands/key.rs @@ -70,10 +70,10 @@ pub fn generate(m: &ArgMatches, force: bool) -> failure::Fallible<()> { } if m.is_present("with-password") { - let p0 = rpassword::prompt_password_stderr( - "Enter password to protect the key: ")?.into(); - let p1 = rpassword::prompt_password_stderr( - "Repeat the password once more: ")?.into(); + let p0 = rpassword::read_password_from_tty(Some( + "Enter password to protect the key: "))?.into(); + let p1 = rpassword::read_password_from_tty(Some( + "Repeat the password once more: "))?.into(); if p0 == p1 { builder = builder.set_password(Some(p0)); |