diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2001-07-31 09:28:45 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2001-07-31 09:28:45 +0000 |
commit | 9c7535eea71014bec75f030e4df32391dda2b253 (patch) | |
tree | e0b59b553c233694e772be518e57638bd7cb6754 /usr.bin/ssh/ssh.c | |
parent | 1621fdf060ff86f8fcd95b53e62f4fcfd888dc1d (diff) |
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 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index dd29b329350..dbadd4dc31e 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/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 <openssl/evp.h> #include <openssl/err.h> @@ -143,11 +143,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 @@ -360,7 +355,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 @@ -1132,9 +1127,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) |