summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-07-14 12:14:27 +1000
committerDamien Miller <djm@mindrot.org>2001-07-14 12:14:27 +1000
commitf3512d9ba7e7ee92493cf394610c2ca047a0f637 (patch)
tree0c7d12ca7e90784963b320e1d16e226a0ab5f2e3
parent8d4bf17036562678cb54653c3167d95f68ac9f09 (diff)
- OpenBSD CVS Sync
- markus@cvs.openbsd.org 2001/07/04 23:49:27 [ssh-agent.c] handle mutiple adds of the same smartcard key
-rw-r--r--ChangeLog5
-rw-r--r--ssh-agent.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bd9d59726..40bcff435 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@
13 - markus@cvs.openbsd.org 2001/07/04 23:39:07 13 - markus@cvs.openbsd.org 2001/07/04 23:39:07
14 [ssh-agent.c] 14 [ssh-agent.c]
15 for smartcards remove both RSA1/2 keys 15 for smartcards remove both RSA1/2 keys
16 - markus@cvs.openbsd.org 2001/07/04 23:49:27
17 [ssh-agent.c]
18 handle mutiple adds of the same smartcard key
16 19
1720010711 2020010711
18 - (djm) dirname(3) may modify its argument on glibc and other systems. 21 - (djm) dirname(3) may modify its argument on glibc and other systems.
@@ -5988,4 +5991,4 @@
5988 - Wrote replacements for strlcpy and mkdtemp 5991 - Wrote replacements for strlcpy and mkdtemp
5989 - Released 1.0pre1 5992 - Released 1.0pre1
5990 5993
5991$Id: ChangeLog,v 1.1389 2001/07/14 02:13:49 djm Exp $ 5994$Id: ChangeLog,v 1.1390 2001/07/14 02:14:27 djm Exp $
diff --git a/ssh-agent.c b/ssh-agent.c
index 044710a43..47cc265c2 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.63 2001/07/04 23:39:07 markus Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.64 2001/07/04 23:49:27 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"
39RCSID("$OpenBSD: ssh-agent.c,v 1.63 2001/07/04 23:39:07 markus Exp $"); 39RCSID("$OpenBSD: ssh-agent.c,v 1.64 2001/07/04 23:49:27 markus Exp $");
40 40
41#include <openssl/evp.h> 41#include <openssl/evp.h>
42#include <openssl/md5.h> 42#include <openssl/md5.h>
@@ -464,6 +464,7 @@ process_add_smartcard_key (SocketEntry *e)
464 success = 1; 464 success = 1;
465 465
466 tab = idtab_lookup(1); 466 tab = idtab_lookup(1);
467 k->type = KEY_RSA1;
467 if (lookup_private_key(k, NULL, 1) == NULL) { 468 if (lookup_private_key(k, NULL, 1) == NULL) {
468 if (tab->nentries == 0) 469 if (tab->nentries == 0)
469 tab->identities = xmalloc(sizeof(Identity)); 470 tab->identities = xmalloc(sizeof(Identity));
@@ -479,6 +480,7 @@ process_add_smartcard_key (SocketEntry *e)
479 xstrdup("rsa1 smartcard"); 480 xstrdup("rsa1 smartcard");
480 tab->nentries++; 481 tab->nentries++;
481 } 482 }
483 k->type = KEY_RSA;
482 tab = idtab_lookup(2); 484 tab = idtab_lookup(2);
483 if (lookup_private_key(k, NULL, 2) == NULL) { 485 if (lookup_private_key(k, NULL, 2) == NULL) {
484 if (tab->nentries == 0) 486 if (tab->nentries == 0)