aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-09-26 00:36:02 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-09-26 00:36:02 +0200
commitadbb087221a90ef1fa687ae5d9575eedd77bcd06 (patch)
tree4c2d9fdc9a4371f1794bb7604e901da8516732f2
parent3a8d839e8604bf66c04ad0b46e51402428a88b1a (diff)
downloadlibssh-adbb087221a90ef1fa687ae5d9575eedd77bcd06.tar.gz
libssh-adbb087221a90ef1fa687ae5d9575eedd77bcd06.tar.xz
libssh-adbb087221a90ef1fa687ae5d9575eedd77bcd06.zip
Removed obsolete options
-rw-r--r--include/libssh/options.h5
-rw-r--r--libssh/dh.c6
-rw-r--r--libssh/kex.c6
-rw-r--r--libssh/options.c4
-rw-r--r--libssh/server.c10
5 files changed, 5 insertions, 26 deletions
diff --git a/include/libssh/options.h b/include/libssh/options.h
index fbe4a97..775933a 100644
--- a/include/libssh/options.h
+++ b/include/libssh/options.h
@@ -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;
diff --git a/libssh/dh.c b/libssh/dh.c
index 4f05251..9088bb9 100644
--- a/libssh/dh.c
+++ b/libssh/dh.c
@@ -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();
diff --git a/libssh/kex.c b/libssh/kex.c
index ded0247..d5eba61 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -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");
diff --git a/libssh/options.c b/libssh/options.c
index 275f9fe..e670f2b 100644
--- a/libssh/options.c
+++ b/libssh/options.c
@@ -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;
diff --git a/libssh/server.c b/libssh/server.c
index 1eb09d5..7e9ad0b 100644
--- a/libssh/server.c
+++ b/libssh/server.c
@@ -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,