Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -23546,7 +23546,7 @@ int SendChannelRequest(WOLFSSH* ssh, byte* name, word32 nameSz)
}


#if defined(WOLFSSH_TERM) && !defined(NO_FILESYSTEM)
#ifdef WOLFSSH_TERM
Comment thread
ejohnstown marked this conversation as resolved.

/* out is always a TERMINAL_MODES_MAX_SZ buffer, and one byte is held back
* for the terminator CreateMode() appends */
Expand Down Expand Up @@ -23804,6 +23804,7 @@ int SendChannelTerminalResize(WOLFSSH* ssh, word32 columns, word32 rows,

#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#include <unistd.h>
#endif

static void GetTerminalInfo(word32* width, word32* height,
Expand Down Expand Up @@ -24061,8 +24062,7 @@ int SendChannelSuccess(WOLFSSH* ssh, word32 channelId, int success)
}


#if (defined(WOLFSSH_SFTP) || defined(WOLFSSH_SCP)) && \
!defined(NO_WOLFSSH_SERVER)
#if defined(WOLFSSH_SFTP) || defined(WOLFSSH_SCP)
/* Checks if 'in' is absolute path, if not the returns the concat. of
* 'defaultPath' | 'in'. This leaves 'in' as-is and does not handle
* simplification of the path, such as removing ../
Expand Down
4 changes: 2 additions & 2 deletions src/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ int wolfSSH_connect(WOLFSSH* ssh)
FALL_THROUGH;

case CONNECT_CLIENT_CHANNEL_AGENT_REQUEST_SENT:
#if defined(WOLFSSH_TERM) && !defined(NO_FILESYSTEM)
#ifdef WOLFSSH_TERM
if (ssh->sendTerminalRequest) {
if ( (ssh->error = SendChannelTerminalRequest(ssh))
< WS_SUCCESS) {
Expand Down Expand Up @@ -1939,7 +1939,7 @@ void* wolfSSH_GetPublicKeyCheckCtx(WOLFSSH* ssh)
}


#if defined(WOLFSSH_TERM) && !defined(NO_FILESYSTEM)
#ifdef WOLFSSH_TERM
/* Used to resize terminal window with shell connections
* returns WS_SUCCESS on success */
int wolfSSH_ChangeTerminalSize(WOLFSSH* ssh, word32 columns, word32 rows,
Expand Down
8 changes: 5 additions & 3 deletions tests/regress.c
Original file line number Diff line number Diff line change
Expand Up @@ -11880,8 +11880,7 @@ static void TestTerminalResizeBlockedAfterDisconnect(void)
#endif /* WOLFSSH_TERM && !NO_FILESYSTEM */
#endif /* !NO_WOLFSSH_CLIENT */

#ifdef WOLFSSH_SFTP
#ifndef NO_WOLFSSH_CLIENT
#if defined(WOLFSSH_SFTP) && !defined(NO_WOLFSSH_CLIENT)
static void TestOct2DecRejectsInvalidNonLeadingDigit(void)
{
WOLFSSH_CTX* ctx;
Expand All @@ -11901,9 +11900,10 @@ static void TestOct2DecRejectsInvalidNonLeadingDigit(void)
wolfSSH_free(ssh);
wolfSSH_CTX_free(ctx);
}
#endif /* !NO_WOLFSSH_CLIENT */
#endif /* WOLFSSH_SFTP && !NO_WOLFSSH_CLIENT */


#ifdef WOLFSSH_SFTP
Comment thread
ejohnstown marked this conversation as resolved.
/* fenrir 2479: the attribute encoder and decoder must agree. Extensions are
* unimplemented, so an encode of WOLFSSH_FILEATRB_EXT writes a zero count and
* the peer's decoder consumes the block instead of reading past it looking for
Expand Down Expand Up @@ -16617,8 +16617,10 @@ int main(int argc, char** argv)
TestKeyboardResponseNoUserAuthCallback(ssh, ctx);
TestKeyboardResponseNullSsh();
TestKeyboardResponseNullCtx(ssh);
#ifndef NO_WOLFSSH_SERVER
TestKbUsernameChangeDisconnects();
TestKbSameUserResponseSucceeds();
#endif
Comment thread
ejohnstown marked this conversation as resolved.
#endif

/* TODO: add app-level regressions that simulate stdin EOF/password
Expand Down
3 changes: 1 addition & 2 deletions wolfssh/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,7 @@ typedef struct HandshakeInfo {
} privKey;
} HandshakeInfo;

#if (defined(WOLFSSH_SFTP) || defined(WOLFSSH_SCP)) && \
!defined(NO_WOLFSSH_SERVER)
#if defined(WOLFSSH_SFTP) || defined(WOLFSSH_SCP)
WOLFSSH_LOCAL int wolfSSH_GetPath(const char* defaultPath, byte* in,
word32 inSz, char* out, word32* outSz);
#endif
Expand Down
1 change: 1 addition & 0 deletions wolfssh/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,7 @@ extern "C" {
#if !defined(NO_TERMIOS) && defined(WOLFSSH_TERM)
#if !defined(USE_WINDOWS_API) && !defined(MICROCHIP_PIC32)
#include <termios.h>
#include <unistd.h>
#define WOLFSSH_TERMIOS struct termios
#elif defined(USE_WINDOWS_API)
#define WOLFSSH_TERMIOS DWORD
Expand Down
4 changes: 0 additions & 4 deletions wolfssh/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ extern "C" {
#endif
#endif

#if defined(WOLFSSH_SCP) && defined(NO_WOLFSSH_SERVER)
#error only SCP server side supported
#endif

/* Detect if ECC needs RNG */
#if !defined(HAVE_WC_ECC_SET_RNG) && \
defined(ECC_TIMING_RESISTANT) && (!defined(HAVE_FIPS) || \
Expand Down
Loading