1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

kex: Fix supported methods index.

This commit is contained in:
Andreas Schneider
2012-10-07 12:01:34 +02:00
parent c81010e2f7
commit ecd2ee95e7

View File

@@ -38,8 +38,7 @@
#ifdef HAVE_LIBGCRYPT #ifdef HAVE_LIBGCRYPT
# define BLOWFISH "blowfish-cbc," # define BLOWFISH "blowfish-cbc,"
# define AES "aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc," # define AES "aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,"
# define DES "3des-cbc" # define DES "3des-cbc,des-cbc-ssh1"
# define SIMPLEDES "des-cbc-ssh1"
#elif defined(HAVE_LIBCRYPTO) #elif defined(HAVE_LIBCRYPTO)
# ifdef HAVE_OPENSSL_BLOWFISH_H # ifdef HAVE_OPENSSL_BLOWFISH_H
# define BLOWFISH "blowfish-cbc," # define BLOWFISH "blowfish-cbc,"
@@ -55,8 +54,7 @@
# else # else
# define AES "" # define AES ""
# endif # endif
# define DES "3des-cbc" # define DES "3des-cbc,des-cbc-ssh1"
# define SIMPLEDES "des-cbc-ssh1"
#endif #endif
#ifdef WITH_ZLIB #ifdef WITH_ZLIB
@@ -75,6 +73,7 @@
#define KEX_METHODS_SIZE 10 #define KEX_METHODS_SIZE 10
/* NOTE: This is a fixed API and the index is defined by ssh_kex_types_e */
static const char *default_methods[] = { static const char *default_methods[] = {
KEY_EXCHANGE, KEY_EXCHANGE,
HOSTKEYS, HOSTKEYS,
@@ -89,12 +88,12 @@ static const char *default_methods[] = {
NULL NULL
}; };
/* NOTE: This is a fixed API and the index is defined by ssh_kex_types_e */
const char *supported_methods[] = { const char *supported_methods[] = {
KEY_EXCHANGE, KEY_EXCHANGE,
HOSTKEYS, HOSTKEYS,
AES BLOWFISH DES, AES BLOWFISH DES,
AES BLOWFISH DES, AES BLOWFISH DES,
SIMPLEDES,
"hmac-sha1", "hmac-sha1",
"hmac-sha1", "hmac-sha1",
ZLIB, ZLIB,