Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -11281,6 +11281,7 @@ int wolfSSH_RsaVerify(const byte *sig, word32 sigSz,
compare = ConstantCompare(encDigest, checkDigest, encDigestSz);

if (checkDigestSz < 0 || sizeCompare || compare) {
(void)loc; // unused if log disabled
WLOG(WS_LOG_DEBUG, "%s: %s", loc, "Bad RSA Verify");
ret = WS_RSA_E;
}
Expand Down
6 changes: 4 additions & 2 deletions wolfssh/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ WOLFSSH_API int wolfSSH_LogEnabled(void);
WOLFSSH_API void wolfSSH_Log(enum wolfSSH_LogLevel,
const char *const, ...) FMTCHECK;

#if defined(DEBUG_WOLFSSH) || defined(WOLFSSH_SSHD)
#define WLOG(...) do { \
if (wolfSSH_LogEnabled()) \
wolfSSH_Log(__VA_ARGS__); \
} while (0)

#else
#define WLOG(...)
#endif

#ifdef __cplusplus
}
#endif

#endif /* _WOLFSSH_LOG_H_ */