Commit Graph

  • 1d6177fceb Send SSH_MSG_CHANNEL_EOF and SSH_MSG_CHANNEL_CLOSE in synchronized block. Fixes issue #84. drieseng 2016-09-10 18:55:03 +02:00
  • b413970148 Added more tracing, and break receive loop when we start disconnecting. drieseng 2016-09-08 21:45:47 +02:00
  • 4632a33e43 Increase timeout waiting for buffered read data. drieseng 2016-09-08 21:45:06 +02:00
  • 1bab13b78d Add comment. drieseng 2016-09-07 21:40:03 +02:00
  • e9807ef3f8 Fix doc to correspond with new implementation. drieseng 2016-09-07 21:34:36 +02:00
  • 77e7bc8c04 Do not catching exceptions while clearing read buffer of socket. Leave this up to the caller. drieseng 2016-09-07 21:34:12 +02:00
  • c274f1f9b5 Catch and log SocketException that is thrown while shutting down the socket or clearing its read buffer. Always log raised exception, even if we're disconnecting. drieseng 2016-09-07 21:33:41 +02:00
  • 879c39badd Rename SendDisconnect to TrySendDisconnect. drieseng 2016-09-07 20:10:45 +02:00
  • f2a8d0ff75 Fix test after refactoring. drieseng 2016-09-06 19:57:32 +02:00
  • 395bbe70d6 Only use Socket.Poll, Socket.Select and read lock when FEATURE_SOCKET_POLL is defined. Added test for SSH server shutdown while we're reading the packet. drieseng 2016-09-05 23:10:34 +02:00
  • f9ad89384f Rename Read(int length) to SocketRead(int length) Introduce dispose lock to resolve race condition in IsConnected/IsSocketConnected. Rename _socketLock to _socketWriteLock Eliminate extra allocations in ReceiveMessage, and combine two socket reads. Use separate lock to eliminate race condition in IsSocketConnected between Poll and checking the Available property. Modify SocketRead(int length, byte[] buffer) to also take offset. Modify MessageListener to use Select instead of blocking Receive. drieseng 2016-09-04 21:20:19 +02:00
  • 6a1859c500 Added Decrypt overload taking offset and length. drieseng 2016-09-04 20:57:15 +02:00
  • ad3de364fd Added Pad overloads taking offset and length. drieseng 2016-09-04 20:52:23 +02:00
  • 344e6e52c0 Use a very short timeout when clearing the read buffer. drieseng 2016-09-04 20:04:07 +02:00
  • 1e802c795e Update tests as we now load data from an offset as not to include the packet length and/or message type. drieseng 2016-09-03 00:02:20 +02:00
  • 5529efcab8 Do not send SSH_MSG_DISCONNECT when the server is closing the session by sending a SSH_MSG_DISCONNECT. drieseng 2016-09-03 00:01:21 +02:00
  • c141c7d4a7 Ignore data of SSH_MSG_IGNORE when its specified length is greater than the actual available bytes. Fixes issue #41. drieseng 2016-09-02 23:50:42 +02:00
  • 76a92cfb0a SshData.cs: - Remove ZeroReaderIndex from SshData; offset should instead be specified when instance is created/loaded. - LoadBytes is now private, and is always invoked when a message is loaded. - Eliminate ResetReader(). SshDataStream.cs: - Added overload taking buffer, offset and count. KeyExchange*Message.cs: - Remove ResetReader() calls. Message.cs: - Remove ZeroReaderIndex override. SftpMessage.cs: - Pass offset and count to Load overload to allow skipping byte representing the message type. - Remove ZeroReaderIndex override. SftpSession.cs: - Avoid buffering when packet contains full SFTP response message. Session.cs: - Pass offset and count to Load overload to allow skipping offset bytes. General: - Temporarily add (too) verbose tracing. drieseng 2016-09-01 21:54:57 +02:00
  • bd2fa5d16f Use the managed thread id as identifier in our trace messages. drieseng 2016-08-23 18:26:43 +02:00
  • 31b2019fe4 Temporarily introduce extra verbose tracing. drieseng 2016-08-23 18:25:52 +02:00
  • 5260f1b73d Number of bytes in read buffer can never be negative. drieseng 2016-08-21 18:46:31 +02:00
  • ad56cc9bdf Take into account the offset in SftpFileStream.Write(byte[] buffer, int offset, int count) when not writing to the buffer. Fixes issue #70. drieseng 2016-08-21 18:14:03 +02:00
  • fb9fe50bc0 Fixed some tests after recent GlobalRequestMessage changes. drieseng 2016-08-15 21:36:37 +02:00
  • 546caedc94 Include session id in (some) trace messages. drieseng 2016-08-15 21:36:13 +02:00
  • 4442b88419 Removed unused import. drieseng 2016-08-15 12:56:50 +02:00
  • 5deccd0c0e Use ASCIIEncoding GetString overload that is supported on all target frameworks. drieseng 2016-08-15 12:55:23 +02:00
  • 820ed146cf Added new classes to all projects used in VS 2015 solution. drieseng 2016-08-15 12:54:52 +02:00
  • 96160b3c74 Added extra debug/trace output. drieseng 2016-08-15 12:49:31 +02:00
  • 5916656d66 Introduce specialized GlobalRequestMessage classes for tcpip-forward and cancel-tcpip-forward. drieseng 2016-08-15 12:48:40 +02:00
  • 7fce6e0b03 When receiving SSH_MSG_GLOBAL_REQUEST, only read data that is not message specific. Fixes issue #58. drieseng 2016-08-15 12:47:22 +02:00
  • 8a97fecddd Improve exception message when attempting to read more bytes than available. drieseng 2016-08-15 12:41:04 +02:00
  • a3a8d42e7c Merge remote-tracking branch 'refs/remotes/origin/develop' 2016.0.0 drieseng 2016-08-02 12:15:21 +02:00
  • 7f8f3121f0 Added netstandard1.3 TFM. Gert Driesen 2016-08-02 10:41:42 +02:00
  • 13cc56304a Prepare for stable release. drieseng 2016-08-01 21:05:02 +02:00
  • 342f3ef751 Merge remote-tracking branch 'refs/remotes/origin/develop' drieseng 2016-08-01 19:27:01 +02:00
  • f4f6708f46 Give in to Resharper's urge to save "migrated" settings. drieseng 2016-07-31 11:45:57 +02:00
  • c5d51b9d9d Harden against "leaking" message registration. Fixes issue #55. drieseng 2016-07-31 11:45:31 +02:00
  • 7e2836a7a7 Modify TryAuthenticate to static. drieseng 2016-07-31 11:39:26 +02:00
  • 07c2a6001f Code formatting. drieseng 2016-07-31 11:38:58 +02:00
  • 330e41b884 Merge remote-tracking branch 'refs/remotes/origin/develop' 2016.0.0-beta3 Gert Driesen 2016-07-27 14:15:07 +02:00
  • 68d9e4fc90 Moved into on conditional compilation symbols to wiki. drieseng 2016-07-27 14:16:26 +02:00
  • 05cdb785ed Merge remote-tracking branch 'refs/remotes/origin/develop' Gert Driesen 2016-07-27 14:10:37 +02:00
  • 75d982bb09 Remove references to EncoderFallbackException and DecoderFallbackException. drieseng 2016-07-27 14:03:22 +02:00
  • abeb2c8738 Use github release for the release notes. drieseng 2016-07-27 13:54:30 +02:00
  • f4a634f1d3 Minor (slash)doc improvements. drieseng 2016-07-27 13:52:31 +02:00
  • 76fdf58581 Improve slashdocs. drieseng 2016-07-27 12:52:50 +02:00
  • 563349d15a When the port is closing, first shutdown the send part of the socket. Subsequently close/dispose the socket to ensure the blocking receive is interrupted. drieseng 2016-07-26 22:11:23 +02:00
  • 1e63a813cc Improved and corrected the slashdocs. Fixed some typos. drieseng 2016-07-26 22:09:50 +02:00
  • bb4e719711 Added tests for SftpDownloadAsyncResult. drieseng 2016-07-26 19:53:00 +02:00
  • ae446661ef Use C# type. drieseng 2016-07-26 19:51:20 +02:00
  • 3598fcf3e4 Do not wrap exceptions in SshException. drieseng 2016-07-26 19:51:06 +02:00
  • db0300e00c Use C# types. drieseng 2016-07-26 19:25:47 +02:00
  • 1b28947a2d Attempt to harden test. drieseng 2016-07-26 14:44:10 +02:00
  • c0caf7dfa3 Harden tests. drieseng 2016-07-26 12:27:57 +02:00
  • 82c288b648 Harden test. drieseng 2016-07-24 22:53:21 +02:00
  • 590277f007 Harden test. drieseng 2016-07-24 22:33:44 +02:00
  • 954db2fcc6 Merge pull request #50 from sshnet/master Gert Driesen 2016-07-24 22:09:25 +02:00
  • 177812fac9 Merge pull request #49 from sshnet/develop Gert Driesen 2016-07-24 22:08:35 +02:00
  • d71baa1811 Use portable pdb. drieseng 2016-07-24 22:03:38 +02:00
  • 75f6911f72 Implement tests for Length and MaxBufferLength. drieseng 2016-07-24 21:11:34 +02:00
  • 351e3c0afa Merge remote-tracking branch 'refs/remotes/origin/develop' drieseng 2016-07-24 10:22:00 +02:00
  • 81993af9d6 Disable null coalescing hint (as we need to support VS 2012 as well). Code formatting updates. drieseng 2016-07-24 10:19:57 +02:00
  • 65bd07259a Stop listener before waiting for channels to close. Remove extra exception handling. drieseng 2016-07-24 10:18:10 +02:00
  • 32becde5ad Mark port started before StartAccept because StartAccept is a noop when the port is not started. drieseng 2016-07-24 10:12:15 +02:00
  • f88509ed56 Ensure to mark port stopped when starting fails. drieseng 2016-07-24 10:05:51 +02:00
  • 5498b8f74a Remove extra exception handling. Stop listener first, before we wait for open channels to close. drieseng 2016-07-24 09:48:54 +02:00
  • 44c21ca7af Merge branch 'develop' of https://github.com/sshnet/SSH.NET.git drieseng 2016-07-24 09:37:48 +02:00
  • 8c5b0e1921 Harden test. drieseng 2016-07-24 09:37:40 +02:00
  • a1e20146c6 Added ForwardedPortStatus to VS 2012 projects. Gert Driesen 2016-07-23 12:04:03 +02:00
  • 5048498bb1 Removed some debug code. drieseng 2016-07-23 19:33:00 +02:00
  • e1a557861c Correctly define the FEATURE_SOCKET_SETSOCKETOPTION symbol. Use Socket.NoDelay property instead of the NoDelay option. No longer use the DontLinger option as this is the default anyway. drieseng 2016-07-23 19:27:02 +02:00
  • 23bb333496 Remove unused import. drieseng 2016-07-23 19:11:17 +02:00
  • 6c6c762caa Use as instead of is and cast. drieseng 2016-07-23 19:09:31 +02:00
  • 59923ceca0 Added tests and some slashdocs for ForwardedPortStatus. drieseng 2016-07-23 17:58:42 +02:00
  • 532dac404d Harden test. drieseng 2016-07-23 12:14:15 +02:00
  • 1d5d58e17c Rename HashAlgorithmFactory to CryptoAbstraction, and move it to the Renci.SshNet.Abstractions namespace. drieseng 2016-07-23 10:49:21 +02:00
  • 4d6a868fd2 Mark GetOrderedAuthenticationMethods static. drieseng 2016-07-23 10:44:43 +02:00
  • a673c1f4f0 Remove unused imports. drieseng 2016-07-23 10:22:28 +02:00
  • 1ac19b86a0 Make methods static where possible. drieseng 2016-07-23 10:21:57 +02:00
  • 7ccee44e16 Remove partial modifiers. drieseng 2016-07-23 10:20:14 +02:00
  • 88cbfad1b8 Remove unnecessary byte casts. drieseng 2016-07-23 10:17:37 +02:00
  • 8749441ec8 Harden tests. drieseng 2016-07-23 10:00:34 +02:00
  • 4033d3d0c1 Attempt to harden test. drieseng 2016-07-22 22:36:25 +02:00
  • e6b0e33727 Harden test. drieseng 2016-07-22 21:06:30 +02:00
  • a148ca1c50 Simply close/dispose socket. drieseng 2016-07-22 20:25:01 +02:00
  • 0a8673bf0c Ignore ObjectDisposedException in AcceptAsync while stopping or stopped. drieseng 2016-07-22 20:12:42 +02:00
  • aa6792fead Merge branch 'develop' of https://github.com/sshnet/SSH.NET.git drieseng 2016-07-22 19:46:39 +02:00
  • 959ec3240f Ignore bunch of placeholder tests. drieseng 2016-07-22 19:20:10 +02:00
  • afeeeb310d Ignore bunch of placeholder tests. drieseng 2016-07-22 19:20:10 +02:00
  • ab5933fbdf Increment signalCount before signaling. drieseng 2016-07-22 17:38:35 +02:00
  • 90145be344 Removed some (conditional) debug code. Introduce (internal) ForwardedPortStatus to control state transition. Align ForwardedPortDynamic and ForwardedPortLocal. drieseng 2016-07-22 13:03:04 +02:00
  • cb1d3b41f7 Merge branch 'develop' of https://github.com/sshnet/SSH.NET.git drieseng 2016-07-17 22:01:21 +02:00
  • bd337ff64a Added PipeStream to .NET 3.5 test project. drieseng 2016-07-17 22:01:07 +02:00
  • d7b1106151 Harden PipeStream tests. drieseng 2016-07-17 21:58:06 +02:00
  • cbf182064f Added CountdownEvent and corresponding test. Gert Driesen 2016-07-17 21:40:33 +02:00
  • 3f73f36f9d Added CountdownEvent and corresponding symbol where applicable. drieseng 2016-07-17 21:25:51 +02:00
  • 18c1b79589 Use CountDownEvent to wait for pending requests to finish instead of using a while/sleep approach. Reuse SocketAsyncEventArgs for accepting connections in our EAP-based socket code. drieseng 2016-07-17 20:54:20 +02:00
  • beacea6727 Remove unused imports. drieseng 2016-07-17 15:00:02 +02:00
  • 637c40d7f7 Remove Attribute suffix. drieseng 2016-07-16 10:50:51 +02:00
  • ece92bda7c Properly handle ObjectDisposedException when invoking EndReceive. drieseng 2016-07-16 10:49:50 +02:00