version 1.131, 2001/07/27 14:50:45 |
version 1.132, 2001/07/31 09:28:44 |
|
|
/* Should we execute a command or invoke a subsystem? */ |
/* Should we execute a command or invoke a subsystem? */ |
int subsystem_flag = 0; |
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. */ |
/* Prints a help message to the user. This function never returns. */ |
|
|
static void |
static void |
|
|
break; |
break; |
case 'I': |
case 'I': |
#ifdef SMARTCARD |
#ifdef SMARTCARD |
sc_reader_num = atoi(optarg); |
options.smartcard_device = atoi(optarg); |
#else |
#else |
fprintf(stderr, "no support for smartcards.\n"); |
fprintf(stderr, "no support for smartcards.\n"); |
#endif |
#endif |
|
|
int i = 0; |
int i = 0; |
|
|
#ifdef SMARTCARD |
#ifdef SMARTCARD |
if (sc_reader_num != -1 && |
if (options.smartcard_device >= 0 && |
options.num_identity_files + 1 < SSH_MAX_IDENTITY_FILES && |
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; |
Key *new; |
|
|
if (options.num_identity_files + 2 > SSH_MAX_IDENTITY_FILES) |
if (options.num_identity_files + 2 > SSH_MAX_IDENTITY_FILES) |