aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-02-09 21:20:17 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2010-02-09 21:20:17 +0100
commit96465a52eedc7f8c96e1d9dc7cf5e6438b670d0f (patch)
tree0311fb1c7d2e7606b01cdda1750bf6900fafc544 /libssh
parent512fa6e6018424c3faea3fdf3cabf46b85886c5e (diff)
downloadlibssh-96465a52eedc7f8c96e1d9dc7cf5e6438b670d0f.tar.gz
libssh-96465a52eedc7f8c96e1d9dc7cf5e6438b670d0f.tar.xz
libssh-96465a52eedc7f8c96e1d9dc7cf5e6438b670d0f.zip
KEX bug: client preference should be prioritary
Diffstat (limited to 'libssh')
-rw-r--r--libssh/kex.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libssh/kex.c b/libssh/kex.c
index 70b3e910..d0753b82 100644
--- a/libssh/kex.c
+++ b/libssh/kex.c
@@ -53,7 +53,7 @@
#define BLOWFISH ""
#endif
#ifdef HAVE_OPENSSL_AES_H
-#define AES "aes256-cbc,aes192-cbc,aes128-cbc,"
+#define AES "aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,"
#else
#define AES ""
#endif
@@ -68,7 +68,7 @@
const char *default_methods[] = {
"diffie-hellman-group1-sha1",
- "ssh-dss,ssh-rsa",
+ "ssh-rsa,ssh-dss",
AES BLOWFISH DES,
AES BLOWFISH DES,
"hmac-sha1",
@@ -82,7 +82,7 @@ const char *default_methods[] = {
const char *supported_methods[] = {
"diffie-hellman-group1-sha1",
- "ssh-dss,ssh-rsa",
+ "ssh-rsa,ssh-dss",
AES BLOWFISH DES,
AES BLOWFISH DES,
"hmac-sha1",
@@ -219,19 +219,19 @@ char *ssh_find_matching(const char *in_d, const char *what_d){
SAFE_FREE(tok_in);
}
- for(i_in=0; tok_in[i_in]; ++i_in){
- for(i_what=0; tok_what[i_what] ; ++i_what){
- if(!strcmp(tok_in[i_in],tok_what[i_what])){
- /* match */
- ret=strdup(tok_in[i_in]);
- /* free the tokens */
- free(tok_in[0]);
- free(tok_what[0]);
- free(tok_in);
- free(tok_what);
- return ret;
- }
+ for(i_what=0; tok_what[i_what] ; ++i_what){
+ for(i_in=0; tok_in[i_in]; ++i_in){
+ if(!strcmp(tok_in[i_in],tok_what[i_what])){
+ /* match */
+ ret=strdup(tok_in[i_in]);
+ /* free the tokens */
+ free(tok_in[0]);
+ free(tok_what[0]);
+ free(tok_in);
+ free(tok_what);
+ return ret;
}
+ }
}
free(tok_in[0]);
free(tok_what[0]);