Removed obsolete options
Этот коммит содержится в:
родитель
3a8d839e86
Коммит
adbb087221
@ -24,7 +24,7 @@
|
||||
|
||||
struct ssh_options_struct {
|
||||
struct error_struct error;
|
||||
char *banner; /* explicit banner to send */
|
||||
char *banner;
|
||||
char *username;
|
||||
char *host;
|
||||
char *bindaddr;
|
||||
@ -34,10 +34,7 @@ struct ssh_options_struct {
|
||||
char *known_hosts_file;
|
||||
socket_t fd; /* specificaly wanted file descriptor, don't connect host */
|
||||
int port;
|
||||
int dont_verify_hostkey; /* Don't spare time, don't check host key ! unneeded to say it's dangerous and not safe */
|
||||
int use_nonexisting_algo; /* if user sets a not supported algorithm for kex, don't complain */
|
||||
char *wanted_methods[10]; /* the kex methods can be choosed. better use the kex fonctions to do that */
|
||||
void *wanted_cookie; /* wants a specific cookie to be sent ? if null, generate a new one */
|
||||
ssh_callbacks callbacks; /* Callbacks to user functions */
|
||||
long timeout; /* seconds */
|
||||
long timeout_usec;
|
||||
|
@ -1000,12 +1000,6 @@ int signature_verify(ssh_session session, ssh_string signature) {
|
||||
|
||||
enter_function();
|
||||
|
||||
if (session->options->dont_verify_hostkey) {
|
||||
ssh_log(session, SSH_LOG_FUNCTIONS, "Host key wasn't verified");
|
||||
leave_function();
|
||||
return 0;
|
||||
}
|
||||
|
||||
pubkey = publickey_from_string(session,session->next_crypto->server_pubkey);
|
||||
if(pubkey == NULL) {
|
||||
leave_function();
|
||||
|
@ -341,11 +341,7 @@ int set_kex(ssh_session session){
|
||||
int i;
|
||||
const char *wanted;
|
||||
enter_function();
|
||||
/* the client might ask for a specific cookie to be sent. useful for server debugging */
|
||||
if(options->wanted_cookie)
|
||||
memcpy(client->cookie,options->wanted_cookie,16);
|
||||
else
|
||||
ssh_get_random(client->cookie,16,0);
|
||||
ssh_get_random(client->cookie,16,0);
|
||||
client->methods=malloc(10 * sizeof(char **));
|
||||
if (client->methods == NULL) {
|
||||
ssh_set_error(session, SSH_FATAL, "No space left");
|
||||
|
@ -219,7 +219,7 @@ static char *get_username_from_uid(ssh_options opt, uid_t uid){
|
||||
#endif
|
||||
|
||||
static int ssh_options_set_algo(ssh_options opt, int algo, const char *list) {
|
||||
if ((!opt->use_nonexisting_algo) && !verify_existing_algo(algo, list)) {
|
||||
if (!verify_existing_algo(algo, list)) {
|
||||
ssh_set_error(opt, SSH_REQUEST_DENIED,
|
||||
"Setting method: no algorithm for method \"%s\" (%s)\n",
|
||||
ssh_kex_nums[algo], list);
|
||||
@ -878,7 +878,7 @@ int ssh_options_set_wanted_algos(ssh_options opt, int algo, const char *list) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((!opt->use_nonexisting_algo) && !verify_existing_algo(algo, list)) {
|
||||
if (!verify_existing_algo(algo, list)) {
|
||||
ssh_set_error(opt, SSH_REQUEST_DENIED, "Setting method: no algorithm "
|
||||
"for method \"%s\" (%s)\n", ssh_kex_nums[algo], list);
|
||||
return -1;
|
||||
|
@ -285,15 +285,7 @@ static int server_set_kex(ssh_session session) {
|
||||
char *wanted;
|
||||
|
||||
ZERO_STRUCTP(server);
|
||||
/*
|
||||
* The program might ask for a specific cookie to be sent. Useful for server
|
||||
* debugging
|
||||
*/
|
||||
if (options->wanted_cookie) {
|
||||
memcpy(server->cookie, options->wanted_cookie, 16);
|
||||
} else {
|
||||
ssh_get_random(server->cookie, 16, 0);
|
||||
}
|
||||
ssh_get_random(server->cookie, 16, 0);
|
||||
|
||||
if (session->dsa_key != NULL && session->rsa_key != NULL) {
|
||||
if (ssh_options_set(options, SSH_OPTIONS_SERVER_HOSTKEY,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user