version 1.22, 2015/05/26 23:23:40 |
version 1.23, 2016/09/12 01:22:38 |
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
*/ |
|
|
#include <sys/param.h> |
|
#include <sys/types.h> |
#include <sys/types.h> |
|
|
#include <openssl/dh.h> |
#include <openssl/dh.h> |
|
|
#include "dispatch.h" |
#include "dispatch.h" |
#include "ssherr.h" |
#include "ssherr.h" |
#include "sshbuf.h" |
#include "sshbuf.h" |
|
#include "misc.h" |
|
|
static int input_kex_dh_gex_group(int, u_int32_t, void *); |
static int input_kex_dh_gex_group(int, u_int32_t, void *); |
static int input_kex_dh_gex_reply(int, u_int32_t, void *); |
static int input_kex_dh_gex_reply(int, u_int32_t, void *); |
|
|
kex->max = DH_GRP_MAX; |
kex->max = DH_GRP_MAX; |
kex->nbits = nbits; |
kex->nbits = nbits; |
if (datafellows & SSH_BUG_DHGEX_LARGE) |
if (datafellows & SSH_BUG_DHGEX_LARGE) |
kex->nbits = MIN(kex->nbits, 4096); |
kex->nbits = MINIMUM(kex->nbits, 4096); |
/* New GEX request */ |
/* New GEX request */ |
if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST)) != 0 || |
if ((r = sshpkt_start(ssh, SSH2_MSG_KEX_DH_GEX_REQUEST)) != 0 || |
(r = sshpkt_put_u32(ssh, kex->min)) != 0 || |
(r = sshpkt_put_u32(ssh, kex->min)) != 0 || |