version 1.240, 2015/08/21 23:53:08 |
version 1.241, 2015/09/24 06:15:11 |
|
|
oPasswordAuthentication, oRSAAuthentication, |
oPasswordAuthentication, oRSAAuthentication, |
oChallengeResponseAuthentication, oXAuthLocation, |
oChallengeResponseAuthentication, oXAuthLocation, |
oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
|
oCertificateFile, |
oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, |
oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
|
|
{ "identityfile", oIdentityFile }, |
{ "identityfile", oIdentityFile }, |
{ "identityfile2", oIdentityFile }, /* obsolete */ |
{ "identityfile2", oIdentityFile }, /* obsolete */ |
{ "identitiesonly", oIdentitiesOnly }, |
{ "identitiesonly", oIdentitiesOnly }, |
|
{ "certificatefile", oCertificateFile }, |
{ "hostname", oHostName }, |
{ "hostname", oHostName }, |
{ "hostkeyalias", oHostKeyAlias }, |
{ "hostkeyalias", oHostKeyAlias }, |
{ "proxycommand", oProxyCommand }, |
{ "proxycommand", oProxyCommand }, |
|
|
} |
} |
|
|
void |
void |
|
add_certificate_file(Options *options, const char *path, int userprovided) |
|
{ |
|
int i; |
|
|
|
if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES) |
|
fatal("Too many certificate files specified (max %d)", |
|
SSH_MAX_CERTIFICATE_FILES); |
|
|
|
/* Avoid registering duplicates */ |
|
for (i = 0; i < options->num_certificate_files; i++) { |
|
if (options->certificate_file_userprovided[i] == userprovided && |
|
strcmp(options->certificate_files[i], path) == 0) { |
|
debug2("%s: ignoring duplicate key %s", __func__, path); |
|
return; |
|
} |
|
} |
|
|
|
options->certificate_file_userprovided[options->num_certificate_files] = |
|
userprovided; |
|
options->certificate_files[options->num_certificate_files++] = |
|
xstrdup(path); |
|
} |
|
|
|
void |
add_identity_file(Options *options, const char *dir, const char *filename, |
add_identity_file(Options *options, const char *dir, const char *filename, |
int userprovided) |
int userprovided) |
{ |
{ |
|
|
} |
} |
break; |
break; |
|
|
|
case oCertificateFile: |
|
arg = strdelim(&s); |
|
if (!arg || *arg == '\0') |
|
fatal("%.200s line %d: Missing argument.", |
|
filename, linenum); |
|
if (*activep) { |
|
intptr = &options->num_certificate_files; |
|
if (*intptr >= SSH_MAX_CERTIFICATE_FILES) { |
|
fatal("%.200s line %d: Too many certificate " |
|
"files specified (max %d).", |
|
filename, linenum, |
|
SSH_MAX_CERTIFICATE_FILES); |
|
} |
|
add_certificate_file(options, arg, |
|
flags & SSHCONF_USERCONF); |
|
} |
|
break; |
|
|
case oXAuthLocation: |
case oXAuthLocation: |
charptr=&options->xauth_location; |
charptr=&options->xauth_location; |
goto parse_string; |
goto parse_string; |
|
|
options->hostkeyalgorithms = NULL; |
options->hostkeyalgorithms = NULL; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->num_identity_files = 0; |
options->num_identity_files = 0; |
|
options->num_certificate_files = 0; |
options->hostname = NULL; |
options->hostname = NULL; |
options->host_key_alias = NULL; |
options->host_key_alias = NULL; |
options->proxy_command = NULL; |
options->proxy_command = NULL; |