summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/ssh-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
-rw-r--r--usr.bin/ssh/ssh-agent.c14
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");