Commit Graph

  • bd801990d5 Only use methods available in .NET 3.5 (and higher). Gert Driesen 2017-08-22 18:31:58 +02:00
  • 0a1a031fc1 Add support for non-ascii characters to ScpClient. Fixes issue #281. Gert Driesen 2017-08-22 18:19:29 +02:00
  • 87a45a8f52 Move past beta2. Gert Driesen 2017-08-16 20:52:17 +02:00
  • bc080e8c1b Prepare for 2016.1.0-beta2. 2016.1.0-beta2 Gert Driesen 2017-08-16 19:23:14 +02:00
  • bc154e6533 Merge pull request #277 from sshnet/develop Gert Driesen 2017-08-16 19:14:20 +02:00
  • b34e1c05a4 Do not set DEBUG and TRACE for Release config. Gert Driesen 2017-08-16 18:58:24 +02:00
  • 8f777f1fc7 SftpClient: Document that the following overloads create the specified file if it does not already exist: AppendAllLines AppendAllText AppendText Gert Driesen 2017-08-16 10:36:07 +02:00
  • 1b21b6dd14 To improve compatibility of SftpClient with System.IO.File, the following methods now use UTF-8 encoding without a Byte-Order Mark (BOM): void AppendAllLines(string path, IEnumerable<string> contents) void AppendAllText(string path, string contents) StreamWriter AppendText(string path) StreamWriter CreateText(string path) void WriteAllLines(string path, IEnumerable<string> contents) void WriteAllLines(string path, string[] contents) void WriteAllText(string path, string contents) Gert Driesen 2017-08-16 10:31:10 +02:00
  • 79c9a4baea SftpFileStream: Position in stream should be left untouched when clearing read buffer. Gert Driesen 2017-08-16 08:56:33 +02:00
  • 68c1e59920 Merge pull request #272 from sshnet/sftpclient-setlength Gert Driesen 2017-08-14 20:54:38 +02:00
  • 30054463e1 Sync project file. Gert Driesen 2017-08-14 20:35:21 +02:00
  • 9444f21461 Added more tests for SftpFileStream.SetLength(long). Gert Driesen 2017-08-14 20:23:01 +02:00
  • 7bc67f3aca Harden tests. Gert Driesen 2017-08-13 21:36:55 +02:00
  • 48205c7f6d Improve SetLength compatibility with FileStream: * Flush any buffers before epand or shrink the stream. * If the specified value is less than the current length of the stream, the current position is moved to the last byte of the stream. Gert Driesen 2017-08-13 15:05:44 +02:00
  • f38c7ce3af SftpFileStream: In Append mode, create the remote file if it does not already exist. Gert Driesen 2017-08-13 13:40:35 +02:00
  • c2552e4e4b SftpFileStream: Only allow Append mode when combined with write-only access. Fixes issue #267. Gert Driesen 2017-08-13 10:54:40 +02:00
  • ea36b240aa Reduce allocations. Gert Driesen 2017-08-07 21:12:28 +02:00
  • b4841baa10 Do not create a List. Gert Driesen 2017-08-07 21:11:15 +02:00
  • e30319a848 Sync project files. Gert Driesen 2017-08-06 22:06:02 +02:00
  • 36f94c26cc Move StatVfsResponse to tests. Gert Driesen 2017-08-06 21:54:59 +02:00
  • b548622524 Rename (I)SftpMessageFactory to (I)SftpResponseFactory. Gert Driesen 2017-08-06 20:11:09 +02:00
  • e2cf28a28d Remove Encoding from SubsystemSession and NetConfSession, and move it to SftpSession (as it is only used there). Refactor creation of SFTP response messages to a SftpResponseFactory. Implement SaveData for a few SFTP response messages. Gert Driesen 2017-08-06 18:33:28 +02:00
  • 9ecfa0d38c Refactor loading of a response to an extended request (SSH_FXP_EXTENDED): Continue reading from SshDataStream instead of creating new instance for type specific part. Gert Driesen 2017-08-06 18:22:44 +02:00
  • 3e1dd2d345 Added CryptoAbstraction.GenerateRandom(int length) method. Gert Driesen 2017-08-06 17:54:47 +02:00
  • f90131229a Fix doc. Gert Driesen 2017-07-30 13:56:48 +02:00
  • 216f364587 Update comments. Gert Driesen 2017-07-30 13:55:54 +02:00
  • 385b8a6c28 Increase initial window size for SSH channels from 2 MB to 2147483647 (2^31 - 1) bytes. Gert Driesen 2017-07-29 15:29:47 +02:00
  • cc04517efd Use BE methods on Pack. Gert Driesen 2017-07-29 11:04:37 +02:00
  • 7c05bd19ba Increase max. SSH packet size back to 68536 (64 KB + 3000). Gert Driesen 2017-07-23 21:54:58 +02:00
  • ea47d9db98 Fix xml doc. Gert Driesen 2017-07-23 20:45:23 +02:00
  • e86fd18b21 Limit size of SSH packet to 35.000 bytes. Improve documentation of LocalChannelDataPacketSize. Gert Driesen 2017-07-23 20:43:11 +02:00
  • fa640e12a5 Improve documentation of LocalPacketSize. Gert Driesen 2017-07-23 20:41:54 +02:00
  • 46966d37cb Precise that we only support SSH-2. Gert Driesen 2017-07-21 14:23:30 +02:00
  • a9a38d7e94 Merge pull request #199 from sshnet/sftpfilestream Gert Driesen 2017-07-16 23:25:37 +02:00
  • 55e31b1e7b Sync project file Gert Driesen 2017-07-16 22:03:06 +02:00
  • bfc52294da Merge remote-tracking branch 'refs/remotes/origin/develop' into sftpfilestream Gert Driesen 2017-07-16 21:59:35 +02:00
  • 17a9c61464 Use langversion 5 for .NET Core project. Gert Driesen 2017-07-16 20:06:53 +02:00
  • b680765692 Add comment to clarify that StreamReader uses a buffer size of 1024 bytes. Gert Driesen 2017-07-16 20:06:12 +02:00
  • 5408aace90 Avoid reading from the server twice to determine EOF. Gert Driesen 2017-07-16 20:04:58 +02:00
  • 416f7be804 Ensure write buffer is initialized before attempting to use it. Gert Driesen 2017-06-17 12:33:04 +02:00
  • 5dda8f5247 Merge branch 'sftpfilestream' of https://github.com/sshnet/SSH.NET into sftpfilestream Gert Driesen 2017-06-12 22:29:21 +02:00
  • c83188a5a9 Harden test. Gert Driesen 2017-06-12 22:29:16 +02:00
  • 50ea405d5a Sync project file. Gert Driesen 2017-06-12 21:35:13 +02:00
  • 6fd1cc78c3 Update Read(byte[] buffer, int offset, int count) to not write bytes to read buffer when the read buffer is empty and count is greater than the number of bytes read from the server. Lazily initialize read and write buffer. Gert Driesen 2017-06-12 21:15:23 +02:00
  • 40efaa6e5a Move back to writing all read bytes to read buffer, not only those that exceed the user supplied buffer. Gert Driesen 2017-06-05 19:10:49 +02:00
  • 733ec56e6e Update ShellStream.cs JasonQG 2017-04-20 15:43:24 -07:00
  • bdec2d22f9 Update markdown after recent Github changes Gert Driesen 2017-03-20 22:16:35 +01:00
  • bcc8def223 No longer track write position separately. Reading from the SftpFileStream will not also affect the position at which a subsequent write will be performed. The position at which a write is performed in the server file is now always the current position minus the position in the buffer. Gert Driesen 2017-03-19 20:37:14 +01:00
  • 99fd7b460f Add tests for SftpFileStream.Seek(...). Gert Driesen 2017-03-19 16:42:46 +01:00
  • 30e8513800 Revert "Update SftFileStream to work correctly with mixed Read, Write and Seek operation, complete rewrite #194" Gert Driesen 2017-03-17 19:59:22 +01:00
  • 0d88ddc79c Update SftFileStream to work correctly with mixed Read, Write and Seek operation, complete rewrite #194 olegkap 2017-03-10 22:05:15 -05:00
  • d93f064c0f Attempt to harden test. Gert Driesen 2017-03-08 20:13:11 +01:00
  • 5f1494f09e Added test to verify that dispose has completed. Gert Driesen 2017-03-08 20:00:13 +01:00
  • ff68b38109 Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop Gert Driesen 2017-03-08 19:44:50 +01:00
  • f6daa4dfa6 Enable HandleShouldHaveBeenClosed test. Gert Driesen 2017-03-08 19:44:44 +01:00
  • 6cb91f600d Update README.md Gert Driesen 2017-03-06 21:52:53 +01:00
  • b3e704b404 Sync .NET 3.5 test project file, and remove usage of string interpolation. Gert Driesen 2017-03-05 21:56:38 +01:00
  • 14b571fdd4 Update tests now that we reject invalid combination of FileMode and FileAccess. Remove duplicate tests. Gert Driesen 2017-03-05 21:42:37 +01:00
  • ff78430ed4 Move null check into FEATURE_THREAD_THREADPOOL section. Gert Driesen 2017-03-05 18:54:28 +01:00
  • 04ca23176a Merge pull request #186 from agayardo/develop Gert Driesen 2017-03-05 18:47:47 +01:00
  • d3635d18fa Added test for recently introduced regression that is fixed by PR #186. Gert Driesen 2017-03-05 18:47:01 +01:00
  • 08b2d05ed8 Added tests for issue #191, and update tests for issue #154. Gert Driesen 2017-03-05 16:01:34 +01:00
  • 40e106828d Throw ArgumentException for invalid combinations of FileMode and FileAccess. Gert Driesen 2017-03-05 16:00:48 +01:00
  • 4b85e78e3c In the SftpFileStream ctor, only obtain file attributes when mode is Append and no longer keep the result as instance field. Update Seek to only obtain file attributes when SeekOrigin is End. Update SetLength to obtain server file attributes before updating sending an SSH_FXP_FSETSTAT with the new size/length. Gert Driesen 2017-03-05 15:58:44 +01:00
  • c2bd7b5171 Unit test fix. Artem Gayardo-Matrosov 2017-03-03 15:39:31 +01:00
  • 68dded5386 Fix for data corruption when reading to a buffer that is smaller than the internal buffer. Artem Gayardo-Matrosov 2017-03-03 15:15:18 +01:00
  • c8373c978f Eliminate intermediate copy to read buffer. Gert Driesen 2017-02-26 17:48:55 +01:00
  • 4e2bd63660 Only write to the read buffer if we actually received data. Gert Driesen 2017-02-19 10:30:40 +01:00
  • 391a41c35d Move on :p Gert Driesen 2017-02-19 10:09:24 +01:00
  • 98aba4920d Only copy the actual number of bytes received to the buffer. Fixes issue #173. Gert Driesen 2017-02-18 13:48:25 +01:00
  • c3927660cf Added ExecuteThreadLongRunning. Gert Driesen 2017-02-18 13:32:30 +01:00
  • 178512c998 Use length of actual hash. Gert Driesen 2017-02-18 13:32:16 +01:00
  • 932f36fd86 Add Pack to project files. Gert Driesen 2017-02-18 11:36:43 +01:00
  • 847119fd87 Identify future optimization. Gert Driesen 2017-02-18 11:21:40 +01:00
  • 73437578c8 Use Monitor.PulseAll to ensure we signal all waiting threads. Gert Driesen 2017-02-17 21:51:50 +01:00
  • 58ab5b8c2a Fix warning. Gert Driesen 2017-02-17 21:47:52 +01:00
  • 1c288485ed Use packing methods from newly introduced Pack class. Gert Driesen 2017-02-14 18:10:34 +01:00
  • 9ca3880c29 Added tests for Reverse. Gert Driesen 2017-02-14 18:05:38 +01:00
  • b73d2e1ea8 Formatting. Gert Driesen 2017-02-14 18:00:18 +01:00
  • 9f6496da62 Added encrypt and decrypt test for CBC mode. Gert Driesen 2017-02-14 18:00:09 +01:00
  • 44211768ba Group all packing methods in Pack class, and add corresponding unit tests. Gert Driesen 2017-02-12 22:07:06 +01:00
  • ed9feebf71 Update summary for ProxyException. Fixes issue #163. Gert Driesen 2017-02-11 14:34:23 +01:00
  • 8e9cf89511 Fix exception message for fallback SOCKS5 error. Fixes issue #167. Gert Driesen 2017-02-11 14:30:17 +01:00
  • 991bff1f8e Fail fast when timeout is zero. Gert Driesen 2017-02-11 12:33:17 +01:00
  • 23847295a8 Merge branch 'develop' of https://github.com/sshnet/SSH.NET into develop Gert Driesen 2017-02-06 17:45:10 +01:00
  • ec467689ce Harden and document test. Gert Driesen 2017-02-06 17:45:05 +01:00
  • 89db30b88c Add SftpFileReader tests. Gert Driesen 2017-02-06 15:37:41 +01:00
  • 38aff42168 Sync project files. Gert Driesen 2017-02-06 15:15:35 +01:00
  • b22690d985 Remove ServiceFactory argument from SftpSession. Gert Driesen 2017-02-06 15:15:27 +01:00
  • d57dbff9ee Remove unused class. Gert Driesen 2017-02-06 15:13:36 +01:00
  • ca10625a93 Add SftpCloseAsyncResult to .NET 3.5 project file. Gert Driesen 2017-02-06 14:14:38 +01:00
  • 703e24b629 Allow Dispose to interrupt blocking wait. Avoid ObjectDisposedException in Read(). Gert Driesen 2017-02-05 22:09:09 +01:00
  • b6d365c0de Micro Gert Driesen 2017-02-05 20:14:23 +01:00
  • c43ff688f2 Update comment. Gert Driesen 2017-02-05 19:52:37 +01:00
  • c1080c16e6 Remove empty line. Gert Driesen 2017-02-05 19:50:19 +01:00
  • 768d1c9a68 Add async Begin/End Close methods. Avoid waiting for async method to complete when its already completed. Gert Driesen 2017-02-05 19:34:06 +01:00
  • f726b706df Make RaiseExceptionEvent private. Gert Driesen 2017-02-05 19:31:52 +01:00
  • 35233fc822 Added async methods for SSH_FXP_OPEN, SSH_FXP_REALPATH, SSH_FXP_STAT and SSH_FXP_LSTAT. Improve SftpFileReader to no longer block when the session is broken, and improve performance by using async methods to open file and obtain file attributes. Internally use an Int32 based timeout (expressed in milliseconds) to eliminate numerous conversions in hot paths. Gert Driesen 2017-02-04 21:39:11 +01:00
  • 7e72af810c Implement Wait with timeout. Gert Driesen 2017-02-04 13:39:50 +01:00
  • bea764f812 Remove EndInvoke with timeout as we use the IAsyncResult.AsyncWaitHandle for this. Gert Driesen 2017-02-04 13:39:14 +01:00