mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 02:38:09 +09:00
Removed obsolete options
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
struct ssh_options_struct {
|
struct ssh_options_struct {
|
||||||
struct error_struct error;
|
struct error_struct error;
|
||||||
char *banner; /* explicit banner to send */
|
char *banner;
|
||||||
char *username;
|
char *username;
|
||||||
char *host;
|
char *host;
|
||||||
char *bindaddr;
|
char *bindaddr;
|
||||||
@@ -34,10 +34,7 @@ struct ssh_options_struct {
|
|||||||
char *known_hosts_file;
|
char *known_hosts_file;
|
||||||
socket_t fd; /* specificaly wanted file descriptor, don't connect host */
|
socket_t fd; /* specificaly wanted file descriptor, don't connect host */
|
||||||
int port;
|
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 */
|
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 */
|
ssh_callbacks callbacks; /* Callbacks to user functions */
|
||||||
long timeout; /* seconds */
|
long timeout; /* seconds */
|
||||||
long timeout_usec;
|
long timeout_usec;
|
||||||
|
|||||||
@@ -1000,12 +1000,6 @@ int signature_verify(ssh_session session, ssh_string signature) {
|
|||||||
|
|
||||||
enter_function();
|
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);
|
pubkey = publickey_from_string(session,session->next_crypto->server_pubkey);
|
||||||
if(pubkey == NULL) {
|
if(pubkey == NULL) {
|
||||||
leave_function();
|
leave_function();
|
||||||
|
|||||||
@@ -341,10 +341,6 @@ int set_kex(ssh_session session){
|
|||||||
int i;
|
int i;
|
||||||
const char *wanted;
|
const char *wanted;
|
||||||
enter_function();
|
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 **));
|
client->methods=malloc(10 * sizeof(char **));
|
||||||
if (client->methods == NULL) {
|
if (client->methods == NULL) {
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ static char *get_username_from_uid(ssh_options opt, uid_t uid){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int ssh_options_set_algo(ssh_options opt, int algo, const char *list) {
|
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,
|
ssh_set_error(opt, SSH_REQUEST_DENIED,
|
||||||
"Setting method: no algorithm for method \"%s\" (%s)\n",
|
"Setting method: no algorithm for method \"%s\" (%s)\n",
|
||||||
ssh_kex_nums[algo], list);
|
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;
|
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 "
|
ssh_set_error(opt, SSH_REQUEST_DENIED, "Setting method: no algorithm "
|
||||||
"for method \"%s\" (%s)\n", ssh_kex_nums[algo], list);
|
"for method \"%s\" (%s)\n", ssh_kex_nums[algo], list);
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -285,15 +285,7 @@ static int server_set_kex(ssh_session session) {
|
|||||||
char *wanted;
|
char *wanted;
|
||||||
|
|
||||||
ZERO_STRUCTP(server);
|
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 (session->dsa_key != NULL && session->rsa_key != NULL) {
|
||||||
if (ssh_options_set(options, SSH_OPTIONS_SERVER_HOSTKEY,
|
if (ssh_options_set(options, SSH_OPTIONS_SERVER_HOSTKEY,
|
||||||
|
|||||||
Reference in New Issue
Block a user