Skip to content

Commit

Permalink
account for WOLFSSH_NO_DH build
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBarthelmeh committed May 17, 2024
1 parent fa8a818 commit 9285a0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2942,8 +2942,11 @@ static const char* MacNameForId(byte macid, byte cipherid)
size_t wolfSSH_GetText(WOLFSSH *ssh, WS_Text id, char *str, size_t strSz)
{
int ret = 0;

#ifndef WOLFSSH_NO_DH
static const char standard_dh_format[] =
"%d-bit Diffie-Hellman with standard group %d";
#endif

if (!ssh || str == NULL || strSz <= 0)
return 0;
Expand Down Expand Up @@ -2995,6 +2998,7 @@ size_t wolfSSH_GetText(WOLFSSH *ssh, WS_Text id, char *str, size_t strSz)
break;
#endif

#ifndef WOLFSSH_NO_DH
case ID_DH_GROUP1_SHA1:
ret = WSNPRINTF(str, strSz, standard_dh_format,
ssh->primeGroupSz*8, 1);
Expand All @@ -3011,6 +3015,7 @@ size_t wolfSSH_GetText(WOLFSSH *ssh, WS_Text id, char *str, size_t strSz)
"%d-bit Diffie-Hellman with server-supplied group",
ssh->primeGroupSz*8);
break;
#endif /* !WOLFSSH_NO_DH */

case ID_EXTINFO_S:
ret = WSNPRINTF(str, strSz, "Server extensions KEX");
Expand Down

0 comments on commit 9285a0a

Please sign in to comment.