summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-06-18 20:28:40 +1000
committerDamien Miller <djm@mindrot.org>2003-06-18 20:28:40 +1000
commit56a0bb07c47285fe78268c95650032ab0ea667cd (patch)
tree093fae55e5f9358686e02bdbcbe6781a8691baf2
parentb2cdcb50a2900953035234bf94f7b586fd9dd429 (diff)
- markus@cvs.openbsd.org 2003/06/12 19:12:03
[scard.c scard.h ssh-agent.c ssh.c] add sc_get_key_label; larsch at trustcenter.de; bugzilla#591
-rw-r--r--ChangeLog5
-rw-r--r--scard.c9
-rw-r--r--scard.h3
-rw-r--r--ssh-agent.c4
-rw-r--r--ssh.c4
5 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index f5d3b36f0..2ccd501ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
9 - nino@cvs.openbsd.org 2003/06/12 15:34:09 9 - nino@cvs.openbsd.org 2003/06/12 15:34:09
10 [scp.c] 10 [scp.c]
11 Typo. Ok markus@. 11 Typo. Ok markus@.
12 - markus@cvs.openbsd.org 2003/06/12 19:12:03
13 [scard.c scard.h ssh-agent.c ssh.c]
14 add sc_get_key_label; larsch at trustcenter.de; bugzilla#591
12 15
1320030614 1620030614
14 - (djm) Update license on fake-rfc2553.[ch]; ok itojun@ 17 - (djm) Update license on fake-rfc2553.[ch]; ok itojun@
@@ -524,4 +527,4 @@
524 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 527 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
525 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 528 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
526 529
527$Id: ChangeLog,v 1.2804 2003/06/18 10:26:34 djm Exp $ 530$Id: ChangeLog,v 1.2805 2003/06/18 10:28:40 djm Exp $
diff --git a/scard.c b/scard.c
index 65f8bff14..906287ba2 100644
--- a/scard.c
+++ b/scard.c
@@ -24,7 +24,7 @@
24 24
25#include "includes.h" 25#include "includes.h"
26#if defined(SMARTCARD) && defined(USE_SECTOK) 26#if defined(SMARTCARD) && defined(USE_SECTOK)
27RCSID("$OpenBSD: scard.c,v 1.27 2003/04/08 20:21:29 itojun Exp $"); 27RCSID("$OpenBSD: scard.c,v 1.28 2003/06/12 19:12:02 markus Exp $");
28 28
29#include <openssl/evp.h> 29#include <openssl/evp.h>
30#include <sectok.h> 30#include <sectok.h>
@@ -554,4 +554,11 @@ done:
554 sectok_close(fd); 554 sectok_close(fd);
555 return (status); 555 return (status);
556} 556}
557
558char *
559sc_get_key_label(Key *key)
560{
561 return xstrdup("smartcard key");
562}
563
557#endif /* SMARTCARD && USE_SECTOK */ 564#endif /* SMARTCARD && USE_SECTOK */
diff --git a/scard.h b/scard.h
index 00999cb09..9ba20a361 100644
--- a/scard.h
+++ b/scard.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: scard.h,v 1.11 2002/06/30 21:59:45 deraadt Exp $ */ 1/* $OpenBSD: scard.h,v 1.12 2003/06/12 19:12:03 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -36,5 +36,6 @@
36Key **sc_get_keys(const char *, const char *); 36Key **sc_get_keys(const char *, const char *);
37void sc_close(void); 37void sc_close(void);
38int sc_put_key(Key *, const char *); 38int sc_put_key(Key *, const char *);
39char *sc_get_key_label(Key *);
39 40
40#endif 41#endif
diff --git a/ssh-agent.c b/ssh-agent.c
index 61ea34580..6c8ff30dd 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -35,7 +35,7 @@
35 35
36#include "includes.h" 36#include "includes.h"
37#include "openbsd-compat/sys-queue.h" 37#include "openbsd-compat/sys-queue.h"
38RCSID("$OpenBSD: ssh-agent.c,v 1.110 2003/06/11 11:18:38 djm Exp $"); 38RCSID("$OpenBSD: ssh-agent.c,v 1.111 2003/06/12 19:12:03 markus Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41#include <openssl/md5.h> 41#include <openssl/md5.h>
@@ -618,7 +618,7 @@ process_add_smartcard_key (SocketEntry *e)
618 if (lookup_identity(k, version) == NULL) { 618 if (lookup_identity(k, version) == NULL) {
619 id = xmalloc(sizeof(Identity)); 619 id = xmalloc(sizeof(Identity));
620 id->key = k; 620 id->key = k;
621 id->comment = xstrdup("smartcard key"); 621 id->comment = sc_get_key_label(k);
622 id->death = death; 622 id->death = death;
623 id->confirm = confirm; 623 id->confirm = confirm;
624 TAILQ_INSERT_TAIL(&tab->idlist, id, next); 624 TAILQ_INSERT_TAIL(&tab->idlist, id, next);
diff --git a/ssh.c b/ssh.c
index 480bd85e6..0142e7fad 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
40 */ 40 */
41 41
42#include "includes.h" 42#include "includes.h"
43RCSID("$OpenBSD: ssh.c,v 1.193 2003/05/15 13:52:10 djm Exp $"); 43RCSID("$OpenBSD: ssh.c,v 1.194 2003/06/12 19:12:03 markus Exp $");
44 44
45#include <openssl/evp.h> 45#include <openssl/evp.h>
46#include <openssl/err.h> 46#include <openssl/err.h>
@@ -1180,7 +1180,7 @@ load_public_identity_files(void)
1180 sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1)); 1180 sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1));
1181 options.num_identity_files++; 1181 options.num_identity_files++;
1182 options.identity_keys[0] = keys[i]; 1182 options.identity_keys[0] = keys[i];
1183 options.identity_files[0] = xstrdup("smartcard key");; 1183 options.identity_files[0] = sc_get_key_label(keys[i]);
1184 } 1184 }
1185 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES) 1185 if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
1186 options.num_identity_files = SSH_MAX_IDENTITY_FILES; 1186 options.num_identity_files = SSH_MAX_IDENTITY_FILES;