diff --git a/README b/README index 3bf8ca3b..eed54878 100644 --- a/README +++ b/README @@ -13,6 +13,8 @@ Version 0.5 Added libssh2_channel_forward_listen_ex(), libssh2_channel_forward_cancel(), and libssh2_channel_forward_accept(). + Added ./configure option '--disable-gex-new' to allow using the older group-exchange format + Version 0.4 ----------- diff --git a/configure.in b/configure.in index 053bf19c..eb9f8beb 100644 --- a/configure.in +++ b/configure.in @@ -138,6 +138,13 @@ AC_ARG_ENABLE(mac-none, AC_HELP_STRING([--enable-mac-none],[Permit "none" MAC -- NOT RECOMMENDED]), [AC_DEFINE(LIBSSH2_MAC_NONE, 1, [Enable "none" MAC -- NOT RECOMMENDED])]) +AC_ARG_ENABLE(gex-new, + AC_HELP_STRING([--disable-gex-new],[Disable "new" diffie-hellman-group-exchange-sha1 method]), + [GEX_NEW=$enableval]) +if test "$GEX_NEW" != "no"; then + AC_DEFINE(LIBSSH2_DH_GEX_NEW, 1, [Enable newer diffie-hellman-group-exchange-sha1 syntax]) +fi + # Checks for header files. # AC_HEADER_STDC AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h]) diff --git a/include/libssh2.h b/include/libssh2.h index c583ee69..7d549232 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -97,9 +97,6 @@ #endif /* LIBSSH2_MAC_NONE already defined (or not) by ./configure */ -/* Enable the "new" version of diffie-hellman-group-exchange-sha1 */ -#define LIBSSH2_DH_GEX_NEW - /* Default generate and safe prime sizes for diffie-hellman-group-exchange-sha1 */ #define LIBSSH2_DH_GEX_MINGROUP 1024 #define LIBSSH2_DH_GEX_OPTGROUP 1536 diff --git a/include/libssh2_config.h.in b/include/libssh2_config.h.in index f5ebd8a9..ecf9261a 100644 --- a/include/libssh2_config.h.in +++ b/include/libssh2_config.h.in @@ -39,6 +39,9 @@ /* Enable "none" cipher -- NOT RECOMMENDED */ #undef LIBSSH2_CRYPT_NONE +/* Enable newer diffie-hellman-group-exchange-sha1 syntax */ +#undef LIBSSH2_DH_GEX_NEW + /* Compile in zlib support */ #undef LIBSSH2_HAVE_ZLIB