|
Lines 135-140
typedef enum {
Link Here
|
| 135 |
oPasswordAuthentication, oRSAAuthentication, |
135 |
oPasswordAuthentication, oRSAAuthentication, |
| 136 |
oChallengeResponseAuthentication, oXAuthLocation, |
136 |
oChallengeResponseAuthentication, oXAuthLocation, |
| 137 |
oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
137 |
oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
|
|
138 |
oCertificateFile, |
| 138 |
oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, |
139 |
oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, |
| 139 |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
140 |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
| 140 |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
141 |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
|
Lines 202-207
static struct {
Link Here
|
| 202 |
{ "identityfile", oIdentityFile }, |
203 |
{ "identityfile", oIdentityFile }, |
| 203 |
{ "identityfile2", oIdentityFile }, /* obsolete */ |
204 |
{ "identityfile2", oIdentityFile }, /* obsolete */ |
| 204 |
{ "identitiesonly", oIdentitiesOnly }, |
205 |
{ "identitiesonly", oIdentitiesOnly }, |
|
|
206 |
{ "certificatefile", oCertificateFile }, |
| 205 |
{ "hostname", oHostName }, |
207 |
{ "hostname", oHostName }, |
| 206 |
{ "hostkeyalias", oHostKeyAlias }, |
208 |
{ "hostkeyalias", oHostKeyAlias }, |
| 207 |
{ "proxycommand", oProxyCommand }, |
209 |
{ "proxycommand", oProxyCommand }, |
|
Lines 366-371
clear_forwardings(Options *options)
Link Here
|
| 366 |
} |
368 |
} |
| 367 |
|
369 |
|
| 368 |
void |
370 |
void |
|
|
371 |
add_certificate_file(Options *options, const char *dir, const char *filename, |
| 372 |
int userprovided) |
| 373 |
{ |
| 374 |
char *path; |
| 375 |
int i; |
| 376 |
|
| 377 |
if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES) |
| 378 |
fatal("Too many certificate files specified (max %d)", |
| 379 |
SSH_MAX_CERTIFICATE_FILES); |
| 380 |
|
| 381 |
if (dir == NULL) /* no dir, filename is absolute */ |
| 382 |
path = xstrdup(filename); |
| 383 |
else |
| 384 |
(void)xasprintf(&path, "%.100s%.100s", dir, filename); |
| 385 |
|
| 386 |
/* Avoid registering duplicates */ |
| 387 |
for (i = 0; i < options->num_certificate_files; i++) { |
| 388 |
if (options->certificate_file_userprovided[i] == userprovided && |
| 389 |
strcmp(options->certificate_files[i], path) == 0) { |
| 390 |
debug2("%s: ignoring duplicate key %s", __func__, path); |
| 391 |
free(path); |
| 392 |
return; |
| 393 |
} |
| 394 |
} |
| 395 |
|
| 396 |
options->certificate_file_userprovided[options->num_certificate_files] = |
| 397 |
userprovided; |
| 398 |
options->certificate_files[options->num_certificate_files++] = path; |
| 399 |
} |
| 400 |
|
| 401 |
void |
| 369 |
add_identity_file(Options *options, const char *dir, const char *filename, |
402 |
add_identity_file(Options *options, const char *dir, const char *filename, |
| 370 |
int userprovided) |
403 |
int userprovided) |
| 371 |
{ |
404 |
{ |
|
Lines 981-986
parse_time:
Link Here
|
| 981 |
} |
1014 |
} |
| 982 |
break; |
1015 |
break; |
| 983 |
|
1016 |
|
|
|
1017 |
case oCertificateFile: |
| 1018 |
arg = strdelim(&s); |
| 1019 |
if (!arg || *arg == '\0') |
| 1020 |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
| 1021 |
if (*activep) { |
| 1022 |
intptr = &options->num_certificate_files; |
| 1023 |
if (*intptr >= SSH_MAX_CERTIFICATE_FILES) |
| 1024 |
fatal("%.200s line %d: Too many identity files specified (max %d).", |
| 1025 |
filename, linenum, SSH_MAX_CERTIFICATE_FILES); |
| 1026 |
add_certificate_file(options, NULL, |
| 1027 |
arg, flags & SSHCONF_USERCONF); |
| 1028 |
} |
| 1029 |
break; |
| 1030 |
|
| 984 |
case oXAuthLocation: |
1031 |
case oXAuthLocation: |
| 985 |
charptr=&options->xauth_location; |
1032 |
charptr=&options->xauth_location; |
| 986 |
goto parse_string; |
1033 |
goto parse_string; |
|
Lines 1625-1630
initialize_options(Options * options)
Link Here
|
| 1625 |
options->hostkeyalgorithms = NULL; |
1672 |
options->hostkeyalgorithms = NULL; |
| 1626 |
options->protocol = SSH_PROTO_UNKNOWN; |
1673 |
options->protocol = SSH_PROTO_UNKNOWN; |
| 1627 |
options->num_identity_files = 0; |
1674 |
options->num_identity_files = 0; |
|
|
1675 |
options->num_certificate_files = 0; |
| 1628 |
options->hostname = NULL; |
1676 |
options->hostname = NULL; |
| 1629 |
options->host_key_alias = NULL; |
1677 |
options->host_key_alias = NULL; |
| 1630 |
options->proxy_command = NULL; |
1678 |
options->proxy_command = NULL; |