diff --git a/src/internal.c b/src/internal.c index 318eca12..bd9cac65 100644 --- a/src/internal.c +++ b/src/internal.c @@ -5589,9 +5589,9 @@ static int DoPacket(WOLFSSH* ssh) if (ssh->isKeying == 1 && ssh->connectState == CONNECT_SERVER_CHANNEL_REQUEST_DONE) { if (ssh->handshake->kexId == ID_DH_GEX_SHA256) { - #ifndef WOLFSSH_NO_DH +#if !defined(WOLFSSH_NO_DH) && !defined(WOLFSSH_NO_DH_GEX_SHA256) ssh->error = SendKexDhGexRequest(ssh); - #endif +#endif } else ssh->error = SendKexDhInit(ssh); diff --git a/src/ssh.c b/src/ssh.c index e9cce136..3f0d9d01 100644 --- a/src/ssh.c +++ b/src/ssh.c @@ -713,7 +713,7 @@ int wolfSSH_connect(WOLFSSH* ssh) } if (ssh->handshake->kexId == ID_DH_GEX_SHA256) { -#ifndef WOLFSSH_NO_DH +#if !defined(WOLFSSH_NO_DH) && !defined(WOLFSSH_NO_DH_GEX_SHA256) ssh->error = SendKexDhGexRequest(ssh); #endif }