version 1.137, 2019/01/20 22:03:29 |
version 1.138, 2019/01/21 12:53:35 |
|
|
fprintf(stderr, " -e pkcs11 Remove keys provided by PKCS#11 provider.\n"); |
fprintf(stderr, " -e pkcs11 Remove keys provided by PKCS#11 provider.\n"); |
fprintf(stderr, " -T pubkey Test if ssh-agent can access matching private key.\n"); |
fprintf(stderr, " -T pubkey Test if ssh-agent can access matching private key.\n"); |
fprintf(stderr, " -q Be quiet after a successful operation.\n"); |
fprintf(stderr, " -q Be quiet after a successful operation.\n"); |
|
fprintf(stderr, " -v Be more verbose.\n"); |
} |
} |
|
|
int |
int |
|
|
char *pkcs11provider = NULL; |
char *pkcs11provider = NULL; |
int r, i, ch, deleting = 0, ret = 0, key_only = 0; |
int r, i, ch, deleting = 0, ret = 0, key_only = 0; |
int xflag = 0, lflag = 0, Dflag = 0, qflag = 0, Tflag = 0; |
int xflag = 0, lflag = 0, Dflag = 0, qflag = 0, Tflag = 0; |
|
SyslogFacility log_facility = SYSLOG_FACILITY_AUTH; |
|
LogLevel log_level = SYSLOG_LEVEL_INFO; |
|
|
ssh_malloc_init(); /* must be called before any mallocs */ |
ssh_malloc_init(); /* must be called before any mallocs */ |
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ |
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */ |
|
|
|
|
OpenSSL_add_all_algorithms(); |
OpenSSL_add_all_algorithms(); |
|
|
|
log_init(__progname, log_level, log_facility, 1); |
|
|
setvbuf(stdout, NULL, _IOLBF, 0); |
setvbuf(stdout, NULL, _IOLBF, 0); |
|
|
/* First, get a connection to the authentication agent. */ |
/* First, get a connection to the authentication agent. */ |
|
|
exit(2); |
exit(2); |
} |
} |
|
|
while ((ch = getopt(argc, argv, "klLcdDTxXE:e:M:m:qs:t:")) != -1) { |
while ((ch = getopt(argc, argv, "vklLcdDTxXE:e:M:m:qs:t:")) != -1) { |
switch (ch) { |
switch (ch) { |
|
case 'v': |
|
if (log_level == SYSLOG_LEVEL_INFO) |
|
log_level = SYSLOG_LEVEL_DEBUG1; |
|
else if (log_level < SYSLOG_LEVEL_DEBUG3) |
|
log_level++; |
|
break; |
case 'E': |
case 'E': |
fingerprint_hash = ssh_digest_alg_by_name(optarg); |
fingerprint_hash = ssh_digest_alg_by_name(optarg); |
if (fingerprint_hash == -1) |
if (fingerprint_hash == -1) |
|
|
goto done; |
goto done; |
} |
} |
} |
} |
|
log_init(__progname, log_level, log_facility, 1); |
|
|
if ((xflag != 0) + (lflag != 0) + (Dflag != 0) > 1) |
if ((xflag != 0) + (lflag != 0) + (Dflag != 0) > 1) |
fatal("Invalid combination of actions"); |
fatal("Invalid combination of actions"); |