From ae996bf7d1967c83a0e0d71e9e89fa9a27d839f9 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Mon, 6 Aug 2001 21:27:53 +0000 Subject: - 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@. --- ssh.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'ssh.c') diff --git a/ssh.c b/ssh.c index d12d7580a..70eaa772b 100644 --- a/ssh.c +++ b/ssh.c @@ -39,7 +39,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh.c,v 1.131 2001/07/27 14:50:45 millert Exp $"); +RCSID("$OpenBSD: ssh.c,v 1.132 2001/07/31 09:28:44 jakob Exp $"); #include #include @@ -151,11 +151,6 @@ Buffer command; /* Should we execute a command or invoke a subsystem? */ int subsystem_flag = 0; -#ifdef SMARTCARD -/* Smartcard reader id */ -int sc_reader_num = -1; -#endif - /* Prints a help message to the user. This function never returns. */ static void @@ -377,7 +372,7 @@ again: break; case 'I': #ifdef SMARTCARD - sc_reader_num = atoi(optarg); + options.smartcard_device = atoi(optarg); #else fprintf(stderr, "no support for smartcards.\n"); #endif @@ -1156,9 +1151,9 @@ load_public_identity_files(void) int i = 0; #ifdef SMARTCARD - if (sc_reader_num != -1 && + if (options.smartcard_device >= 0 && options.num_identity_files + 1 < SSH_MAX_IDENTITY_FILES && - (public = sc_get_key(sc_reader_num)) != NULL ) { + (public = sc_get_key(options.smartcard_device)) != NULL ) { Key *new; if (options.num_identity_files + 2 > SSH_MAX_IDENTITY_FILES) -- cgit v1.2.3