From 9285a0a38bc076ef5d2356f6f516892cb6af63c3 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 17 May 2024 15:18:24 -0600 Subject: [PATCH] account for WOLFSSH_NO_DH build --- src/ssh.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ssh.c b/src/ssh.c index 1648adce4..19192da16 100644 --- a/src/ssh.c +++ b/src/ssh.c @@ -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; @@ -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); @@ -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");