version 1.297, 2018/08/12 20:19:13 |
version 1.298, 2018/09/20 03:30:44 |
|
|
oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, |
oCanonicalizeFallbackLocal, oCanonicalizePermittedCNAMEs, |
oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
oStreamLocalBindMask, oStreamLocalBindUnlink, oRevokedHostKeys, |
oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
oFingerprintHash, oUpdateHostkeys, oHostbasedKeyTypes, |
oPubkeyAcceptedKeyTypes, oProxyJump, |
oPubkeyAcceptedKeyTypes, oCASignatureAlgorithms, oProxyJump, |
oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported |
oIgnore, oIgnoredUnknownOption, oDeprecated, oUnsupported |
} OpCodes; |
} OpCodes; |
|
|
|
|
{ "dynamicforward", oDynamicForward }, |
{ "dynamicforward", oDynamicForward }, |
{ "preferredauthentications", oPreferredAuthentications }, |
{ "preferredauthentications", oPreferredAuthentications }, |
{ "hostkeyalgorithms", oHostKeyAlgorithms }, |
{ "hostkeyalgorithms", oHostKeyAlgorithms }, |
|
{ "casignaturealgorithms", oCASignatureAlgorithms }, |
{ "bindaddress", oBindAddress }, |
{ "bindaddress", oBindAddress }, |
{ "bindinterface", oBindInterface }, |
{ "bindinterface", oBindInterface }, |
{ "clearallforwardings", oClearAllForwardings }, |
{ "clearallforwardings", oClearAllForwardings }, |
|
|
*charptr = xstrdup(arg); |
*charptr = xstrdup(arg); |
break; |
break; |
|
|
|
case oCASignatureAlgorithms: |
|
charptr = &options->ca_sign_algorithms; |
|
goto parse_keytypes; |
|
|
case oLogLevel: |
case oLogLevel: |
log_level_ptr = &options->log_level; |
log_level_ptr = &options->log_level; |
arg = strdelim(&s); |
arg = strdelim(&s); |
|
|
options->macs = NULL; |
options->macs = NULL; |
options->kex_algorithms = NULL; |
options->kex_algorithms = NULL; |
options->hostkeyalgorithms = NULL; |
options->hostkeyalgorithms = NULL; |
|
options->ca_sign_algorithms = NULL; |
options->num_identity_files = 0; |
options->num_identity_files = 0; |
options->num_certificate_files = 0; |
options->num_certificate_files = 0; |
options->hostname = NULL; |
options->hostname = NULL; |
|
|
void |
void |
fill_default_options(Options * options) |
fill_default_options(Options * options) |
{ |
{ |
char *all_cipher, *all_mac, *all_kex, *all_key; |
char *all_cipher, *all_mac, *all_kex, *all_key, *all_sig; |
int r; |
int r; |
|
|
if (options->forward_agent == -1) |
if (options->forward_agent == -1) |
|
|
all_mac = mac_alg_list(','); |
all_mac = mac_alg_list(','); |
all_kex = kex_alg_list(','); |
all_kex = kex_alg_list(','); |
all_key = sshkey_alg_list(0, 0, 1, ','); |
all_key = sshkey_alg_list(0, 0, 1, ','); |
|
all_sig = sshkey_alg_list(0, 1, 1, ','); |
#define ASSEMBLE(what, defaults, all) \ |
#define ASSEMBLE(what, defaults, all) \ |
do { \ |
do { \ |
if ((r = kex_assemble_names(&options->what, \ |
if ((r = kex_assemble_names(&options->what, \ |
|
|
ASSEMBLE(kex_algorithms, KEX_SERVER_KEX, all_kex); |
ASSEMBLE(kex_algorithms, KEX_SERVER_KEX, all_kex); |
ASSEMBLE(hostbased_key_types, KEX_DEFAULT_PK_ALG, all_key); |
ASSEMBLE(hostbased_key_types, KEX_DEFAULT_PK_ALG, all_key); |
ASSEMBLE(pubkey_key_types, KEX_DEFAULT_PK_ALG, all_key); |
ASSEMBLE(pubkey_key_types, KEX_DEFAULT_PK_ALG, all_key); |
|
ASSEMBLE(ca_sign_algorithms, SSH_ALLOWED_CA_SIGALGS, all_sig); |
#undef ASSEMBLE |
#undef ASSEMBLE |
free(all_cipher); |
free(all_cipher); |
free(all_mac); |
free(all_mac); |
free(all_kex); |
free(all_kex); |
free(all_key); |
free(all_key); |
|
free(all_sig); |
|
|
#define CLEAR_ON_NONE(v) \ |
#define CLEAR_ON_NONE(v) \ |
do { \ |
do { \ |
|
|
dump_cfg_string(oIgnoreUnknown, o->ignored_unknown); |
dump_cfg_string(oIgnoreUnknown, o->ignored_unknown); |
dump_cfg_string(oKbdInteractiveDevices, o->kbd_interactive_devices); |
dump_cfg_string(oKbdInteractiveDevices, o->kbd_interactive_devices); |
dump_cfg_string(oKexAlgorithms, o->kex_algorithms ? o->kex_algorithms : KEX_CLIENT_KEX); |
dump_cfg_string(oKexAlgorithms, o->kex_algorithms ? o->kex_algorithms : KEX_CLIENT_KEX); |
|
dump_cfg_string(oCASignatureAlgorithms, o->ca_sign_algorithms ? o->ca_sign_algorithms : SSH_ALLOWED_CA_SIGALGS); |
dump_cfg_string(oLocalCommand, o->local_command); |
dump_cfg_string(oLocalCommand, o->local_command); |
dump_cfg_string(oRemoteCommand, o->remote_command); |
dump_cfg_string(oRemoteCommand, o->remote_command); |
dump_cfg_string(oLogLevel, log_level_name(o->log_level)); |
dump_cfg_string(oLogLevel, log_level_name(o->log_level)); |