- 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
diff --git a/ChangeLog b/ChangeLog
index f5d3b36..2ccd501 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,9 @@
    - nino@cvs.openbsd.org 2003/06/12 15:34:09
      [scp.c]
      Typo. Ok markus@.
+   - 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
 
 20030614
  - (djm) Update license on fake-rfc2553.[ch]; ok itojun@
@@ -524,4 +527,4 @@
  - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
    Report from murple@murple.net, diagnosis from dtucker@zip.com.au
 
-$Id: ChangeLog,v 1.2804 2003/06/18 10:26:34 djm Exp $
+$Id: ChangeLog,v 1.2805 2003/06/18 10:28:40 djm Exp $
diff --git a/scard.c b/scard.c
index 65f8bff..906287b 100644
--- a/scard.c
+++ b/scard.c
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 #if defined(SMARTCARD) && defined(USE_SECTOK)
-RCSID("$OpenBSD: scard.c,v 1.27 2003/04/08 20:21:29 itojun Exp $");
+RCSID("$OpenBSD: scard.c,v 1.28 2003/06/12 19:12:02 markus Exp $");
 
 #include <openssl/evp.h>
 #include <sectok.h>
@@ -554,4 +554,11 @@
 		sectok_close(fd);
 	return (status);
 }
+
+char *
+sc_get_key_label(Key *key)
+{
+	return xstrdup("smartcard key");
+}
+
 #endif /* SMARTCARD && USE_SECTOK */
diff --git a/scard.h b/scard.h
index 00999cb..9ba20a3 100644
--- a/scard.h
+++ b/scard.h
@@ -1,4 +1,4 @@
-/*	$OpenBSD: scard.h,v 1.11 2002/06/30 21:59:45 deraadt Exp $	*/
+/*	$OpenBSD: scard.h,v 1.12 2003/06/12 19:12:03 markus Exp $	*/
 
 /*
  * Copyright (c) 2001 Markus Friedl.  All rights reserved.
@@ -36,5 +36,6 @@
 Key	**sc_get_keys(const char *, const char *);
 void	 sc_close(void);
 int	 sc_put_key(Key *, const char *);
+char	*sc_get_key_label(Key *);
 
 #endif
diff --git a/ssh-agent.c b/ssh-agent.c
index 61ea345..6c8ff30 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -35,7 +35,7 @@
 
 #include "includes.h"
 #include "openbsd-compat/sys-queue.h"
-RCSID("$OpenBSD: ssh-agent.c,v 1.110 2003/06/11 11:18:38 djm Exp $");
+RCSID("$OpenBSD: ssh-agent.c,v 1.111 2003/06/12 19:12:03 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/md5.h>
@@ -618,7 +618,7 @@
 		if (lookup_identity(k, version) == NULL) {
 			id = xmalloc(sizeof(Identity));
 			id->key = k;
-			id->comment = xstrdup("smartcard key");
+			id->comment = sc_get_key_label(k);
 			id->death = death;
 			id->confirm = confirm;
 			TAILQ_INSERT_TAIL(&tab->idlist, id, next);
diff --git a/ssh.c b/ssh.c
index 480bd85..0142e7f 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.193 2003/05/15 13:52:10 djm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.194 2003/06/12 19:12:03 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -1180,7 +1180,7 @@
 			    sizeof(Key *) * (SSH_MAX_IDENTITY_FILES - 1));
 			options.num_identity_files++;
 			options.identity_keys[0] = keys[i];
-			options.identity_files[0] = xstrdup("smartcard key");;
+			options.identity_files[0] = sc_get_key_label(keys[i]);
 		}
 		if (options.num_identity_files > SSH_MAX_IDENTITY_FILES)
 			options.num_identity_files = SSH_MAX_IDENTITY_FILES;