1

(12 replies, posted in wolfSSL)

Thank you for the tips. I configured the client socket to non blocking and now I can use wolfSSH_stream_read() in order to trigger the window adjustment processing.

2

(12 replies, posted in wolfSSL)

Another problem, which I could figure out today:

Putty sends in it's window adjust message a string called "winadj@putty.projects.tartarus.org" (see https://tartarus.org/~simon/putty-snaps … ndixF.html). This string is 34 characters long but the variable, where it is copied (call of GetString() in DoChannelRequest()) has a length of 32 characters. This leads to an invalidation of the next variables on the stack. An increment of the string variable size would solve the problem.

3

(12 replies, posted in wolfSSL)

That is right. The server calls wolfSSH_stram_send() many times in order to send a huge amount of data, but without calling wolfSSH_stream_read() in between. But the fact is, that when it calls wolfSSH_stream_read() between all these send calls, it expects some data from the client. When the client is not sending any data except the window adjustment message, wolfSSH_stream_read() does not return and any following operation is blocked.

So what do you suggest to do in this case?

4

(12 replies, posted in wolfSSL)

Hi John,

I have sent you an e-mail.

Best, Marco

5

(2 replies, posted in wolfSSL)

Great, thanks!

6

(2 replies, posted in wolfSSL)

Hi,

in the current example code of the SSH echoserver, connections are closed by calling close(clientFd)

This seems not to be a clean connection close, because Putty returns with the message

Fatal Error

Server unexprectedly closed network connection

Would it be possible to get an API function like for example wolfSSH_close, wich calls the internal function SendChannelClose in order to close the connection in a clean way?

Thanks,
Marco

7

(12 replies, posted in wolfSSL)

Right, I am using the latest Github code.

8

(12 replies, posted in wolfSSL)

Hey John,

I am using OpenSSH client (1:7.2p2-4ubuntu2.1) on Linux and PuTTY (0.67) on Windows. Both clients show the same behavior.

Best,
Marco

9

(12 replies, posted in wolfSSL)

Hi,

I currently implemented a SSH server based on the current wolfSSH v1.0.0 from github, orienting on the example echoserver, that is included.

When I am trying to send a huge amount of data to the client, calling wolfSSH_stream_send, it stops sending data after a specific amount. I found out, that the peer window size (channel->peerWindowSz) gets decreased with every call of wolfSSH_stream_send, but never gets increased anymore. When the value of channel->peerWindowSz reachess zero, the call of wolfSSH_stream_send does not send any data and returns with "0".

So how should the software behave in this case? Is there maybe a possibility to do a window adjustment in order to send all data?

Thanks,
Marco