summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-08-06 21:27:53 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-08-06 21:27:53 +0000
commitae996bf7d1967c83a0e0d71e9e89fa9a27d839f9 (patch)
treef86f60887b43e7afce310e073ac48417f588b1b9 /ssh.c
parent94baf30d14ec1fb5b483ccca983d9faf3ef0ae2e (diff)
- jakob@cvs.openbsd.org 2001/07/31 09:28:44
[readconf.c readconf.h ssh.1 ssh.c] add 'SmartcardDevice' client option to specify which smartcard device is used to access a smartcard used for storing the user's private RSA key. ok markus@.
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ssh.c b/ssh.c
index d12d7580a..70eaa772b 100644
--- a/ssh.c
+++ b/ssh.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: ssh.c,v 1.131 2001/07/27 14:50:45 millert Exp $"); 42RCSID("$OpenBSD: ssh.c,v 1.132 2001/07/31 09:28:44 jakob Exp $");
43 43
44#include <openssl/evp.h> 44#include <openssl/evp.h>
45#include <openssl/err.h> 45#include <openssl/err.h>
@@ -151,11 +151,6 @@ Buffer command;
151/* Should we execute a command or invoke a subsystem? */ 151/* Should we execute a command or invoke a subsystem? */
152int subsystem_flag = 0; 152int subsystem_flag = 0;
153 153
154#ifdef SMARTCARD
155/* Smartcard reader id */
156int sc_reader_num = -1;
157#endif
158
159/* Prints a help message to the user. This function never returns. */ 154/* Prints a help message to the user. This function never returns. */
160 155
161static void 156static void
@@ -377,7 +372,7 @@ again:
377 break; 372 break;
378 case 'I': 373 case 'I':
379#ifdef SMARTCARD 374#ifdef SMARTCARD
380 sc_reader_num = atoi(optarg); 375 options.smartcard_device = atoi(optarg);
381#else 376#else
382 fprintf(stderr, "no support for smartcards.\n"); 377 fprintf(stderr, "no support for smartcards.\n");
383#endif 378#endif
@@ -1156,9 +1151,9 @@ load_public_identity_files(void)
1156 int i = 0; 1151 int i = 0;
1157 1152
1158#ifdef SMARTCARD 1153#ifdef SMARTCARD
1159 if (sc_reader_num != -1 && 1154 if (options.smartcard_device >= 0 &&
1160 options.num_identity_files + 1 < SSH_MAX_IDENTITY_FILES && 1155 options.num_identity_files + 1 < SSH_MAX_IDENTITY_FILES &&
1161 (public = sc_get_key(sc_reader_num)) != NULL ) { 1156 (public = sc_get_key(options.smartcard_device)) != NULL ) {
1162 Key *new; 1157 Key *new;
1163 1158
1164 if (options.num_identity_files + 2 > SSH_MAX_IDENTITY_FILES) 1159 if (options.num_identity_files + 2 > SSH_MAX_IDENTITY_FILES)