summaryrefslogtreecommitdiff
path: root/ssh-agent.c
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 /ssh-agent.c
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
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c6
1 files changed, 4 insertions, 2 deletions
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)