version 1.61, 2001/02/08 14:39:36 |
version 1.62, 2001/02/11 12:59:25 |
|
|
#include "readconf.h" |
#include "readconf.h" |
#include "match.h" |
#include "match.h" |
#include "misc.h" |
#include "misc.h" |
|
#include "kex.h" |
|
#include "mac.h" |
|
|
/* Format of the configuration file: |
/* Format of the configuration file: |
|
|
|
|
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, |
oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias |
} OpCodes; |
} OpCodes; |
|
|
{ "port", oPort }, |
{ "port", oPort }, |
{ "cipher", oCipher }, |
{ "cipher", oCipher }, |
{ "ciphers", oCiphers }, |
{ "ciphers", oCiphers }, |
|
{ "macs", oMacs }, |
{ "protocol", oProtocol }, |
{ "protocol", oProtocol }, |
{ "remoteforward", oRemoteForward }, |
{ "remoteforward", oRemoteForward }, |
{ "localforward", oLocalForward }, |
{ "localforward", oLocalForward }, |
|
|
options->ciphers = xstrdup(arg); |
options->ciphers = xstrdup(arg); |
break; |
break; |
|
|
|
case oMacs: |
|
arg = strdelim(&s); |
|
if (!arg || *arg == '\0') |
|
fatal("%.200s line %d: Missing argument.", filename, linenum); |
|
if (!mac_valid(arg)) |
|
fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.", |
|
filename, linenum, arg ? arg : "<NONE>"); |
|
if (*activep && options->macs == NULL) |
|
options->macs = xstrdup(arg); |
|
break; |
|
|
case oProtocol: |
case oProtocol: |
intptr = &options->protocol; |
intptr = &options->protocol; |
arg = strdelim(&s); |
arg = strdelim(&s); |
|
|
options->number_of_password_prompts = -1; |
options->number_of_password_prompts = -1; |
options->cipher = -1; |
options->cipher = -1; |
options->ciphers = NULL; |
options->ciphers = NULL; |
|
options->macs = NULL; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->num_identity_files = 0; |
options->num_identity_files = 0; |
options->hostname = NULL; |
options->hostname = NULL; |
|
|
if (options->cipher == -1) |
if (options->cipher == -1) |
options->cipher = SSH_CIPHER_NOT_SET; |
options->cipher = SSH_CIPHER_NOT_SET; |
/* options->ciphers, default set in myproposals.h */ |
/* options->ciphers, default set in myproposals.h */ |
|
/* options->macs, default set in myproposals.h */ |
if (options->protocol == SSH_PROTO_UNKNOWN) |
if (options->protocol == SSH_PROTO_UNKNOWN) |
options->protocol = SSH_PROTO_1|SSH_PROTO_2|SSH_PROTO_1_PREFERRED; |
options->protocol = SSH_PROTO_1|SSH_PROTO_2|SSH_PROTO_1_PREFERRED; |
if (options->num_identity_files == 0) { |
if (options->num_identity_files == 0) { |