diff options
author | Jim Rees <rees@cvs.openbsd.org> | 2002-03-21 22:44:06 +0000 |
---|---|---|
committer | Jim Rees <rees@cvs.openbsd.org> | 2002-03-21 22:44:06 +0000 |
commit | dcde6987471499ebb47f4135ff9f234c92d4d668 (patch) | |
tree | 56b33462549ca07c5136a88184366afa3cab3df1 /usr.bin/ssh/ssh-agent.c | |
parent | b13360f23fd5a0a9f472c230f42b1913af9b9b17 (diff) |
Add PIN-protection for secret key.
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
-rw-r--r-- | usr.bin/ssh/ssh-agent.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c index 786f91c7b6f..5851b63619a 100644 --- a/usr.bin/ssh/ssh-agent.c +++ b/usr.bin/ssh/ssh-agent.c @@ -35,7 +35,7 @@ #include "includes.h" #include <sys/queue.h> -RCSID("$OpenBSD: ssh-agent.c,v 1.82 2002/03/04 17:27:39 stevesk Exp $"); +RCSID("$OpenBSD: ssh-agent.c,v 1.83 2002/03/21 22:44:05 rees Exp $"); #include <openssl/evp.h> #include <openssl/md5.h> @@ -445,12 +445,14 @@ process_add_smartcard_key (SocketEntry *e) { Idtab *tab; Key *n = NULL, *k = NULL; - char *sc_reader_id = NULL; + char *sc_reader_id = NULL, *pin; int success = 0; sc_reader_id = buffer_get_string(&e->input, NULL); - k = sc_get_key(sc_reader_id); + pin = buffer_get_string(&e->input, NULL); + k = sc_get_key(sc_reader_id, pin); xfree(sc_reader_id); + xfree(pin); if (k == NULL) { error("sc_get_pubkey failed"); @@ -496,11 +498,13 @@ process_remove_smartcard_key(SocketEntry *e) { Key *k = NULL; int success = 0; - char *sc_reader_id = NULL; + char *sc_reader_id = NULL, *pin; sc_reader_id = buffer_get_string(&e->input, NULL); - k = sc_get_key(sc_reader_id); + pin = buffer_get_string(&e->input, NULL); + k = sc_get_key(sc_reader_id, pin); xfree(sc_reader_id); + xfree(pin); if (k == NULL) { error("sc_get_pubkey failed"); |