diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-03-22 04:51:06 +0100 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-03-22 04:51:06 +0100 |
commit | ba72d30aa541015c4e17c21cc1328c7db399d26a (patch) | |
tree | 48d275fba1025501485f2f67a6a3b6140a4e63ba /ssh-add.c | |
parent | - rees@cvs.openbsd.org 2002/03/21 21:54:34 (diff) | |
download | openssh-ba72d30aa541015c4e17c21cc1328c7db399d26a.tar.xz openssh-ba72d30aa541015c4e17c21cc1328c7db399d26a.zip |
- rees@cvs.openbsd.org 2002/03/21 22:44:05
[authfd.c authfd.h ssh-add.c ssh-agent.c ssh.c]
Add PIN-protection for secret key.
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-add.c,v 1.52 2002/03/21 10:21:20 markus Exp $"); +RCSID("$OpenBSD: ssh-add.c,v 1.53 2002/03/21 22:44:05 rees Exp $"); #include <openssl/evp.h> @@ -176,7 +176,13 @@ add_file(AuthenticationConnection *ac, const char *filename) static int update_card(AuthenticationConnection *ac, int add, const char *id) { - if (ssh_update_card(ac, add, id)) { + char *pin; + + pin = read_passphrase("Enter passphrase for smartcard: ", RP_ALLOW_STDIN); + if (pin == NULL) + return -1; + + if (ssh_update_card(ac, add, id, pin)) { fprintf(stderr, "Card %s: %s\n", add ? "added" : "removed", id); return 0; |