diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-agent.c | 7 |
2 files changed, 8 insertions, 4 deletions
@@ -10,6 +10,9 @@ | |||
10 | - markus@cvs.openbsd.org 2001/07/04 23:13:10 | 10 | - markus@cvs.openbsd.org 2001/07/04 23:13:10 |
11 | [scard.c scard.h ssh-agent.c] | 11 | [scard.c scard.h ssh-agent.c] |
12 | handle card removal more gracefully, add sc_close() to scard.h | 12 | handle card removal more gracefully, add sc_close() to scard.h |
13 | - markus@cvs.openbsd.org 2001/07/04 23:39:07 | ||
14 | [ssh-agent.c] | ||
15 | for smartcards remove both RSA1/2 keys | ||
13 | 16 | ||
14 | 20010711 | 17 | 20010711 |
15 | - (djm) dirname(3) may modify its argument on glibc and other systems. | 18 | - (djm) dirname(3) may modify its argument on glibc and other systems. |
@@ -5985,4 +5988,4 @@ | |||
5985 | - Wrote replacements for strlcpy and mkdtemp | 5988 | - Wrote replacements for strlcpy and mkdtemp |
5986 | - Released 1.0pre1 | 5989 | - Released 1.0pre1 |
5987 | 5990 | ||
5988 | $Id: ChangeLog,v 1.1388 2001/07/14 02:13:26 djm Exp $ | 5991 | $Id: ChangeLog,v 1.1389 2001/07/14 02:13:49 djm Exp $ |
diff --git a/ssh-agent.c b/ssh-agent.c index 61e79c5fc..044710a43 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.62 2001/07/04 23:13:10 markus Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.63 2001/07/04 23:39:07 markus Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include "includes.h" | 38 | #include "includes.h" |
39 | RCSID("$OpenBSD: ssh-agent.c,v 1.62 2001/07/04 23:13:10 markus Exp $"); | 39 | RCSID("$OpenBSD: ssh-agent.c,v 1.63 2001/07/04 23:39:07 markus Exp $"); |
40 | 40 | ||
41 | #include <openssl/evp.h> | 41 | #include <openssl/evp.h> |
42 | #include <openssl/md5.h> | 42 | #include <openssl/md5.h> |
@@ -515,6 +515,7 @@ process_remove_smartcard_key(SocketEntry *e) | |||
515 | if ((k = sc_get_key(sc_reader_num)) == NULL) { | 515 | if ((k = sc_get_key(sc_reader_num)) == NULL) { |
516 | error("sc_get_pubkey failed"); | 516 | error("sc_get_pubkey failed"); |
517 | } else { | 517 | } else { |
518 | k->type = KEY_RSA1; | ||
518 | private = lookup_private_key(k, &idx, 1); | 519 | private = lookup_private_key(k, &idx, 1); |
519 | if (private != NULL) { | 520 | if (private != NULL) { |
520 | Idtab *tab = idtab_lookup(1); | 521 | Idtab *tab = idtab_lookup(1); |
@@ -525,6 +526,7 @@ process_remove_smartcard_key(SocketEntry *e) | |||
525 | tab->nentries--; | 526 | tab->nentries--; |
526 | success = 1; | 527 | success = 1; |
527 | } | 528 | } |
529 | k->type = KEY_RSA; | ||
528 | private = lookup_private_key(k, &idx, 2); | 530 | private = lookup_private_key(k, &idx, 2); |
529 | if (private != NULL) { | 531 | if (private != NULL) { |
530 | Idtab *tab = idtab_lookup(2); | 532 | Idtab *tab = idtab_lookup(2); |
@@ -536,7 +538,6 @@ process_remove_smartcard_key(SocketEntry *e) | |||
536 | success = 1; | 538 | success = 1; |
537 | } | 539 | } |
538 | key_free(k); | 540 | key_free(k); |
539 | sc_close(); | ||
540 | } | 541 | } |
541 | 542 | ||
542 | buffer_put_int(&e->output, 1); | 543 | buffer_put_int(&e->output, 1); |