mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
fix: move ssh_gssapi_check_client_config() from ssh_options_set to ssh_options_apply
Signed-off-by: Gauravsingh Sisodia <xaerru@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Jakub Jelen
parent
5a99cf9c7f
commit
83114b636f
@@ -1262,13 +1262,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
|
|||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
bool *x = (bool *)value;
|
bool *x = (bool *)value;
|
||||||
rc = ssh_gssapi_check_client_config(session);
|
|
||||||
if (rc == SSH_OK) {
|
|
||||||
session->opts.gssapi_key_exchange = *x;
|
session->opts.gssapi_key_exchange = *x;
|
||||||
} else {
|
|
||||||
SSH_LOG(SSH_LOG_WARN, "Disabled GSSAPI key exchange");
|
|
||||||
session->opts.gssapi_key_exchange = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SSH_OPTIONS_GSSAPI_KEY_EXCHANGE_ALGS:
|
case SSH_OPTIONS_GSSAPI_KEY_EXCHANGE_ALGS:
|
||||||
@@ -2147,6 +2141,16 @@ int ssh_options_apply(ssh_session session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_GSSAPI
|
||||||
|
if (session->opts.gssapi_key_exchange) {
|
||||||
|
rc = ssh_gssapi_check_client_config(session);
|
||||||
|
if (rc != SSH_OK) {
|
||||||
|
SSH_LOG(SSH_LOG_WARN, "Disabled GSSAPI key exchange");
|
||||||
|
session->opts.gssapi_key_exchange = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user