Add ./configure option '--disable-gex-new' to fallback on

older diffie-hellman-group-exchange-sha1 syntax.

i.e. Use SSH_MSG_KEX_DH_GEX_REQUEST_OLD
rather then SSH_MSG_KEX_DH_GEX_REQUEST

See draft-ietf-secsh-dh-group-exchange section 7 for details.
This commit is contained in:
Sara Golemon 2004-12-31 00:15:18 +00:00
parent d1b33840bf
commit cf8ca63ea0
4 changed files with 12 additions and 3 deletions

2
README
View File

@ -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
-----------

View File

@ -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])

View File

@ -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

View File

@ -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