using Rebex.Net;

Welcome to using Rebex.Net; Sign in | Help
in Search

Using Rebex.Net

News and announcements about Rebex.NET components

  • Build 3854: Encryption in Rebex ZIP, FIPS-mode in Rebex FTP/SSL

    Encryption and other enhancements in Rebex ZIP

    We added all the important features that didn't make it into the first release of Rebex ZIP: AES encryption, stream-based access to compressed files, asynchronous methods, and more. Check out the list below for details. On top of that, a new explorer-like sample was added.

    FIPS 140-2 mode in FTP/SSL

    When using Rebex FTP on a machine where only certified FIPS 140-2 algorithms are allowed, a FIPS 140-2 mode is enabled and non-compliant algorithms are switched off. This mode can also be enabled manually by referencing Rebex.Security.dll and setting the Rebex.Security.Cryptography.CryptoHelper.UseFipsAlgorithmsOnly property to true. This was already available in Rebex SFTP before.

    New stream-based access to remote files in SFTP

    While there is nothing wrong with PutFile and GetFile methods, sometimes a stream-based access is required. We now added a new GetStream method that returns a stream representing a remote file - and all the stream features are supported, including seeking and setting file length. This makes it possible to (for example) use Rebex SFTP with Rebex ZIP to access a remote ZIP file and extract selected files from it without having to download the whole ZIP file.

    Complete list of changes:

    • FTP/SSL: Added FIPS 140-2 compliant mode that is automatically enabled on systems where only compliant algorithms are allowed.
    • FTP: Ftp class inherits from NetworkSession base class that implements some common properties.
    • FTP: Added a workaround for FTP servers with broken MLST output.
    • FTP: SITE command is no longer used to detect MS IIS FTP 7.x because it caused problems to some firewalls.
    • FTP: FtpList.GetEnumerator is now an implementation of IEnumerable<FtpItem>.
    • FTP: Better error handling in GetFiles/PutFiles methods.
    • SFTP: Added Sftp.GetStream method that makes it possible to open a readable/writable/seekable stream of a remote file.
    • SFTP: Added ProtocolVersion property to Sftp class.
    • SFTP: Added SftpOption.UseReadWriteModeForDownloads option.
    • SFTP: Sftp class inherits from NetworkSession base class that implements some common properties.
    • SFTP: SftpItemCollection.GetEnumerator is now an implementation of IEnumerable<SftpItem>.
    • SFTP: Fixed a DateTime range check in SftpAttributes.Modified and .Created which was performed before the conversion to UTC.
    • SFTP: Better error handling in GetFiles/PutFiles methods.
    • S/MIME: Added support for AES ecnryption (128, 192 and 256bit).
    • MIME: A more descriptive exception is thrown when attempting to save a mail message into a directory path instead of file path.
    • MIME: Changed routine for fixing invalid filenames, it no longer changes the '%' character.
    • MIME: Added a MimeOptions.DisableSinglePartHtmlWorkaround option to disable single-part HTML workaround in MailMessage.
    • MIME: Attachment, view and resource collections' GetEnumerator is now an implementation of IEnumerable<T>.
    • IMAP: ImapMessageCollection implements IEnumerable<ImapMessageInfo>.
    • IMAP: Imap class inherits from NetworkSession base class that implements some common properties.
    • SMTP: Smtp class inherits from NetworkSession base class that implements some common properties.
    • POP3: Pop3 class inherits from NetworkSession base class that implements some common properties.
    • POP3: Added a workaround for an old version of Lotus Domino that advertises APOP support but don't actually support it.
    • POP3: Pop3MessageCollection implements IEnumerable<Pop3MessageInfo>.
    • SSH Shell: Ssh class inherits from NetworkSession base class that implements some common properties.
    • Terminal: Added new SendToServer method overload to TerminalControl and VirtualTerminal that makes it possible to easily simulate function keys.
    • Terminal: New BreakSeqeuence option added to TerminalOptions.
    • SSH Core: In FIPS-only mode, a CryptoAPI implementation of AES is used if available.
    • SSH Core: Added support for aes*-ctr and 3des-ctr ciphers.
    • SSH Core: SshSession class inherits from NetworkSession base class that implements some common properties.
    • ZIP: Added a new overload for Extract, Add and Delete methods that accepts a list of files.
    • ZIP: Added ZipItem.Open() method that makes it possible to open a readable stream of a compressed file.
    • ZIP: Added a new Rebex.IO.Compression.Streams namespace with low-level compression/decompression classes (Deflate, Enhanced Deflate, ZLIB).
    • ZIP: Better error handling in AddFiles/ExtractFiles/ExtractAll methods.
    • ZIP: Fixed a bug in handling the Retry action if an error occured while retrieving hierarchy.
    • ZIP: Added support for password-based encryption using 256bit, 192bit, 128bit AES and ZIP 2.0.
    • ZIP: Added ShrinkProgress event to make it possible to display shrink progress.
    • ZIP: Asynchronous methods added to ZipArchive class: AddAsync, ExtractAsync, MoveAsync, DeleteAsync, SaveAsync.
    • ZIP: Added support for persisting and restoring last access and creation dates.
    • ZIP: Added a DeleteUnfinishedFileOnExtractError option to specify whether to delete or keep a file on extract error.

    Some of you already noticed Rebex DLLs in Visual Studio 2010's application folders. It's now official - we are proud to anounce that Microsoft is using Rebex FTP/SSL and SFTP in Microsoft Visual Studio 2010 and Microsoft Expression Web!

    If you would like to be informed about what's going on at Rebex, you are welcome to follow us on Twitter.

  • Microsoft is using Rebex FTP/SSL and SFTP in Microsoft Visual Studio 2010 and Microsoft Expression Web

    One of top 10 new features of Expression Web 3 was the ability to publish a website using FTPS (FTP/SSL) or SFTP.

    We are proud that Rebex has contributed to this feature by licensing Rebex FTP/SSL and Rebex SFTP components to Microsoft.

    These Rebex components are currently used in the following Microsoft applications:

    • Microsoft Expression Web 3
    • Microsoft Expression Web 4
    • Microsoft Visual Studio 2010

    We are proud that Microsoft chose us from all other vendors. Thanks!

    Licensing Q/A:

    Question: I am a user of Microsoft Visual Studio 2010 or Expression Web. I want to use a Rebex SFTP/FTP in my application too. Do I have to obtain a separate license for Rebex components?

    Answer: Yes. Each developer working with the component must have a developer's license. You may distribute Rebex DLLs with your app royalty free if you have purchased a license, but you cannot transfer the right to develop new applications with Rebex components to your customers.

  • Hotfix: FIPS 140-2 compliant mode added to FTP/SSL

    We have just released a hotfix for Rebex FTP/SSL that adds FIPS 140-2 compliant mode. It is automatically enabled on systems where only FIPS-compliant algorithms are allowed. This has already been available in Rebex SFTP. This hotfix is only needed when running Rebex FTP/SSL on a FIPS-only systems.

    If you have an active Rebex FTP/SSL, Rebex File Transfer Pack or Rebex Total Pack license, you can download the hotfix from the following URL:

    http://www.rebex.net/protected/hotfix-ftp-fips.aspx

  • New component: Rebex ZIP for .NET

    A new Rebex component has been released: Rebex ZIP for .NET.

    Rebex ZIP is a compression component for .NET languages (such as C# or VB.NET). It makes it easy to work with ZIP archive files from your application.

    Features include:

    • Easy to use API (see the tutorial).
    • International characters in filenames (Unicode support).
    • Large file support (over 4GB).
    • Wildcards support for adding, extracting and deleting files.
    • Recursive directory tree operations.
    • Add data to ZIP file from stream or memory.
    • Deflate and Enhanced Deflate support (compatible with Deflate64(tm) by PKWARE).
    • Open self-extracting ZIP archives.
    • All operations are done without any temporary files.
    • Custom Deflate algorithm implementation - no dependency on any open-source ZLib compression libraries (unlike many others).
    sample-winform-zip-extractor
  • Build 3793: .NET 4.0 support, massive attachment sending in Mail

    .NET 4.0 and Visual Studio 2010 are supported

    This release adds support for .NET 4.0 and Visual Studio 2010. Native .NET 4.0 builds of all our components are available.

    Sending mail messages with massive attachments

    In Rebex Mail, it is now possible to send huge attachmets using the new do-not-load-into-memory options. By huge, we mean attachments of virtually unlimited size. This feature is not enabled by default (because not loading data into memory has some drawbacks), so if you are interested in it, check out our Q&A forum.

    Tumbleweed's SSL-like encrypted tunnel support

    Tumbleweed SecureTransport servers are often used by large financial institutions. In addition to explicit and implicit TLS/SSL, these servers also support a proprietary SSL-like encryption tunnel that makes it possible to use encrypted connection but still be able to work with FTP-aware firewalls (designed for unencrypted FTP). Rebex FTP/SSL is one of the few FTP clients supporting this feature. To use it, just specify FtpSecurity.TumbleweedTunnel instead of .Explicit when connecting.

    Complete list of changes:

    • FTP: Information about invalid data IP address detection is now written to the log.
    • FTP: Fixed a bug that caused "/" local path argument of PutFiles/GetFiles methods to be treated as current directory.
    • FTP: A more meaningful exception is raised when a premature OK response is received while still uploading data.
    • FTP: More information is logged when a FTP connection is broken.
    • FTP: A full local path is passed in FtpBatchTransferProgressEventArgs.
    • FTP: Added experimental FtpOptions.UseLargeBuffers to use larger internal buffers (doesn't seem to make substantial difference on most systems).
    • FTP: Fixed a bug in PRET command implementation that caused problems with DrFTPd servers.
    • FTP: FtpTransferProgressEventArgs now contain RemotePath and LocalPath when available.
    • FTP: FtpBatchTransferException is now serializable.
    • FTP: On .NET Compact Framework, SO_LINGER option is enabled for data sockets.
    • FTP/SSL: Added support for Tumbleweed's SSL-like encrypted tunnel encryption.
    • FTP/SSL: Removed useless pre-authentication feature check in implicit SSL mode.
    • SFTP: Fixed a bug that caused "/" local path argument of PutFiles/GetFiles methods to be treated as current directory.
    • SFTP: Added Sftp.Bind and Scp.Bind method to make it possible to bind the SFTP or SCP object to existing SSH session.
    • SFTP: A full local path is passed in SftpBatchTransferProgressEventArgs.
    • SFTP: SftpTransferProgressEventArgs now contain RemotePath and LocalPath when available.
    • SFTP: SftpBatchTransferException is now serializable.
    • SFTP: Queued data packets are no longer written to the output stream after download operation has been aborted.
    • MIME: Fixed a bug that caused an exception to be raised when assigning one MailMessage's mail address collection property to another.
    • MIME: Added MimeOptions.DoNotCloseStreamAfterLoad option.
    • MIME: Added a workaround for parsing 'References' header with missing angle brackets.
    • S/MIME: Signed and/or encrypted e-mail messages with TNEF body are now parsed correctly.
    • SMTP: Added MimeOptions.DoNotPreloadAttachments to make it possible to handle extremely large attachments.
    • POP3: Added a workaround for QuarkMail Server that incorrectly announces authentication capabilies.
    • SSH Shell: Added experimental support for CSH to Shell class.
    • SSH Shell: Added Ssh.Bind method to make it possible to bind the Ssh object to an existing SSH session.
    • Terminal: Fixed a bug that caused cursor to be redrawn incorrectly in some cases.
    • SSH Core: Added a workaround for a server that announces support for "password" authentication but requires "keyboard-interactive" instead.
    • SSH Core: Fixed a bug in ZLIB compression routines that caused compatibility problems with GlobalScape and BitVise servers when compression was enabled.
    • SSH Core: Fixed a bug that caused SSH session to hang if a broken (incomplete) SSH packet arrived (rare).

    Rebex ZIP has just been released as well! We are now busy adding enryption capabilities to it. Is there a need for another ZIP component? We are sure there is, because Rebex ZIP is one of the few ZIP components that don't rely on any open-source library for ZLIB compression - yes, we wrote everything from scratch.

    Also, we just launched our Twitter account - If you would like to be informed about what's going on at Rebex, you are welcome to follow us!
  • Build 3723: Speed measuring in FTP and SFTP, enhanced terminal emulation

    Speed measuring in FTP and SFTP

    Rebex SFTP and Rebex FTP now have built-in transfer speed measuring support. To retrieve the estimated current speed, simply read it from the BytesPerSecond property of TransferProgress event arguments.

    Terminal emulation enhancements

    Terminal emulation classes in Rebex SSH Shell and Rebex Telnet were extended with lots of new methods and properties. Also, experimental support for Wyse 60 terminal emulation was added. If you use this, please let us know how well it works.

    Bugfixes and small enhancements

    This release contains lot of these. Many of them were reported or requested by our customers, so if there is something you would like to have, just let us know about it.

     

    Complete list of changes:

    • FTP: FtpTransferProgressEventArgs.BytesPerSecond property added that contains the estimated current speed.
    • FTP: Ftp.TransferProgress event is called less often on high-speed connections now (several times per second is sufficient).
    • FTP: Added support for OTC S/KEY(tm) (One-Time Password System) authentication according to RFC 2289 (optionally used by Serv-U FTP Server). (S/KEY is a trademark of Bellcore.)
    • FTP: Added FtpBatchTransferOptions.XCopy batch transfer mode. This is an alternative form of FtpBatchTransferOptions.Recursive that traverses all subdirectories but only transfers files that match the specified mask.
    • FTP: Maximum allowed UploadBufferLength changed from 64KB to 16MB.
    • FTP: New Ftp.DataAddress property to make it possible to specify active mode IP address transmitted to the FTP server.
    • FTP: HierarchyRetrieve events are no longer raised when only a single file is transferred.
    • FTP: A more meaningful exception is thrown when a directory path is passed to Ftp.GetFile method instead of file path.
    • FTP: FtpOptions.SendDataAsynchronously is deprecated and ignored.
    • FTP: Fixed PutFiles method to accept all kinds of root paths (such as "c:", "c:/", or "c:\" - previously, only "c:\." worked).
    • FTP/SSL: Added Ftp.DefaultImplicitSslPort constant.
    • SFTP: SftpTransferProgressEventArgs.BytesPerSecond property added that contains the estimated current speed.SFTP: A more meaningful exception is thrown when a directory path is passed to Sftp.GetFile method instead of file path.
    • SFTP: Sftp.TransferProgress event is called less often on high-speed connections now (several times per second is sufficient).
    • SFTP: Added SftpBatchTransferOptions.XCopy batch transfer mode. This is an alternative form of FtpBatchTransferOptions.Recursive that traverses all subdirectories but only transfers files that match the specified mask.
    • SFTP: Added support for getting and setting file creating date (only works with servers that support SFTP v4).
    • SFTP: Data-block-receiving routines optimized to write directly to the output stream without a round-trip through a temporary buffer.
    • SFTP: Added experimental SftpOptions.UseLargeBuffers to use larger internal buffers (doesn't seem to make substantial difference on most systems).
    • SFTP: Fixed SSH_FXP_READ packet logging code that caused some packets not to appear in the communication log.
    • SFTP: Added a workaround for servers where SSH_FXP_STAT command doesn't work correctly on directories.
    • SFTP: Fixed a bug in GetFile method that caused it to hang if length was specified.
    • SFTP: Fixed PutFiles method to accept all kinds of root paths (such as "c:", "c:/", or "c:\" - previously, only "c:\." worked).
    • SFTP: HierarchyRetrieve events are no longer raised when only a single file is transferred.
    • SFTP: Fixed a bug that made it impossible to call Sftp.GetFiles method on a root directory.
    • MIME: MailMessage.CreateReply now supports and processes the Refereces header according to RFC 2822 and common practices.
    • MIME: Added MailMessage.ToByteArray() and MailMessage.Load(byte[]) methods.
    • MIME: Attachment.ContentDescription property added.
    • MIME: MimeEntity.SetSignedContent and SetEnvelopeContent methods enhanced to disallow creating circular paths.
    • MIME: Added support for TNEF-based HTML bodies.
    • MIME: Fixed a bug in binary MIME parser that caused broken data to be parsed.
    • MIME: MailAddress.ToString and MailAddressCollection.ToString methods now quote display names if needed.
    • MIME: Fixed the MIME parser behavior with Mimeoptions.DoNotParseMimeTree options on non-compliant messages with lines too long.
    • MIME: MIME parser enhanced to handle non-compliant input data with duplicate <CR> characters.
    • S/MIME: Added a new overload of MailMessage.Sign method to make it possible to specify signature style.
    • S/MIME: Better handling of application/pkcs7-mime attachments that are not an S/MIME signature.
    • S/MIME: Added MimeOptions.SkipSenderCheck option to make it possible to skip sender check when validating signatures using MailMessage.ValidateSignature method.
    • S/MIME: Support for S/MIME messages encrypted using RC2 with effective key length not equal to key data length.
    • SMTP: Added NTLM and GSSAPI/Kerberos authentication support to .NET Compact Framework version.
    • SMTP/SSL: Added Smtp.DefaultImplicitSslPort and Smtp.AlternativeExplicitSslPort constants
    • POP3: Added NTLM and GSSAPI/Kerberos authentication support to .NET Compact Framework version.
    • POP3/SSL: Added Pop3.DefaultImplicitSslPort constant.
    • IMAP: Two new methods in ImapMessageCollection - ToSequenceNumberMessageSet and ToUniqueIdMessageSet.
    • IMAP: Added NTLM and GSSAPI/Kerberos authentication support to .NET Compact Framework version.
    • IMAP: Added ImapListFields.MessageStructure value, ImapMessageInfo.GetParts method and Imap.GetMessagePart method to make it possible to evaluate and download message views, resources and attachments individually without the need to download the whole message.
    • IMAP: Communication compression support added. Needs to be enabled using Imap.EnabledExtensions.
    • IMAP: Fixed a bug in ImapMessageSet.Add and AddRange method s that made them fail when adding multiple non-range values.
    • IMAP: Envelope parser enhanced to better handle envelopes with bad e-mail addresses.
    • IMAP: Date parser enhanced to handle rare two-digit-year date values properly.
    • IMAP: Added several new search criteria to ImapSearchParameter class: All, Unread (NotSeen), MessageSet, Keyword, NotKeyword and Not.
    • IMAP: Added a workaround for Exchange 2007 server that doesn't properly support searching address headers such as From, To or CC.
    • IMAP: Fixed a bug in GetMessageInfo that made it set the Seen flag when called with ImapListFields.Body even if ImapOption.DoNotPeekMessage was enabled.
    • IMAP/SSL: Added Imap.DefaultImplicitSslPort constant.
    • SSH Shell: Added Terminal.GetSelectedText method to make it possible to retrieve the currently selected text.
    • SSH Shell: Ssh.Login method now accepts empty usernames.
    • SSH Shell: SshTerminalControl.LogWriter property added to make logging easier.
    • Terminal: Added TerminalPalette.Sco palette.
    • Terminal: TerminalOptions.PersistColorsOnSgr added to make it possible to specify whether "CSI 0 m" escape sequence (default rendition) whould reset colors as well.
    • Terminal: TerminalScreen.GetRegion and TerminalScreen.GetRegionText methods added to make it easily possible to retrieve a part of the screen content.
    • Terminal: Block selection mode added (accessible through TerminalControl.SelectionMode property or using the Ctrl key).
    • Terminal: Added TerminalControl.MousePasteEnabled to make it possible to disable automated paste on right mouse button click.
    • Terminal: Terminal emulator now supports CSI 10, CSI 11 and CSI 12 escape sequences.
    • Terminal: Added SendToserver(byte[]) method to TerminalControl and VirtualTerminal classes.
    • Terminal: Added experimental support for Wyse 60 terminals.
    • Terminal: Added support for CFT and CBT escape sequences to terminal emulator.
    • Terminal: New overload of TerminalScreen.Clear method added to make it possible to clear the history buffer as well.
    • Terminal: Redefined background color in custom color scheme mode is now applied to all parts of the terminal screen.
    • Terminal: Instances of Shell class returned from Ssh.StartShell i Prompt mode now refuse to work if the prompt was not set.
    • Terminal: SshShell instances returned by Ssh.StartCommand no longer stop on prompt-like text when ReadAll is called.
    • Terminal: Changed TerminalControl.Save and VirtualTerminal.Save in ANSI mode to not write the final <CR><LF> sequence.
    • Terminal: Fixed a bug in "CSI 0 J" escape sequence interpreter that caused the whole line to be cleared (instead of onyl a part of it).
    • Terminal: Fixed a bug that occasionally caused InvalidOperationException to ve thrown on disconnected channels.
    • SSH Core: Added SshFingerprint.Compute and SshFingerprint.FromBase64String methods to make it possible to easily calculate a fingerprint of the supplied public key.
    • SSH Core: ZLIB compression is now switched off by default (caused problems with some servers).
    • SSH Core: Client KEX_INIT packet is sent without waiting for the server side one (this is the only proper behavior).
    • SSH Core: Added SshSession.KeepAlive method to make it possible to periodically "ping" the SSH connection to keep it working and detect failures.
      • Security: Added Certificate.LoadDerWithKey method to make it possible to easily load certificates with private keys in external file (Unix-style).
      • Security: Support for PKCS #7 EnvelopedData encrypted using RC2 with effective key length not equal to key data length.
      • Security: Fixed a bug in EnvelopedData class that cause a NullReferenceException to be raised when unsupported encryption algorithm is encoutered.
      • Security: Internal ModPow method optimized.
      • Security: Key generation support removed from RSAManaged a DSAManaged. No part of any of our components ever used it at it was prohibitively slow anyway.
      • TLS/SSL: TlsSocket.SessionID is deprecated because it's global cache was unsuitable for most applications. TlsSocket.Session (and the associated TlsSession class) should be used instead.
      • ProxySocket: The underscore character is now allowed in hostnames (this is non-standard, but used by Windows).
      • ProxySocket: FileLogWriter is capable of logging into a single file from multiple applications now.
      • ProxySocket: ProxySocket.Send behavior changed to always send all the data or fail.

      A beta version of Rebex ZIP will be available next week and a final release will follow in spring. If anyone is interested in trying this out, please let us know!

      We also launched a new support forum recently. I'm sure those of you who use stackoverflow.com will find it familiar :-)

    • Build 3588: Kerberos support in Rebex Mail

      GSSAPI and Kerberos support in Mail and Secure Mail

      Few months ago, we introduced GSSAPI/Kerberos authentication support in Rebex SFTP - and now it is available in Rebex Mail and Rebex Secure Mail as well! Microsoft SSPI is used as an underlying authentication provider for both. In practice, this means you can authenticate with SMTP, POP3 or IMAP to Microsoft Exchange server using Kerberos single-sign-on, which is definitely an improvement over NTLM. Negotiate algorithm is also supported - this automatically selects either NTLM or Kerberos, depending on what is available.

      This feature is not supported in .NET Compact Framework edition of Rebex (Secure) Mail - it will be added in the next release.

      SFTP v4 support

      Rebex SFTP supports v4 of the protocol now. In practice, one of the main benefits is that it is possible to select transfer type (Sftp.TransferType) without need to select the target OS type first (Sftp.ServerType). Unfortunately, many SFTP servers inclusing OpenSSH only supports SFTP v3, which means that the target OS type has to be still set for these. Another benefit of SFTP v4 is that it uses UTF-8 charset by default, which is a great improvement - in v3, charset was undefined.

      Integrated ZLIB support in SSH, SFTP, SCP and SSH Shell

      ZLIB is used to compress all communication. This means faster file transfers in SFTP and SCP when transferring compressible files and better throughput for Rebex SSH Shell, where most data is simple text. To disable ZLIB compression and make the new version work just like before, use SshParameters.Compression property, as described in this SFTP tutorial. This also means that the experimental ZLIB compression support introduced in build 3428 no longer works because there is no need for it now.

      Complete list of changes:

      • FTP: Added FtpOptions.ConnectPassiveLater option - makes the passive mode transfer initialize the connection only after the LIST/NLST/RETR/STOR commands are sent (instead of after PASV).
      • FTP: Enhanced MODE Z support.
      • FTP: Added a workaroud for bad PASV implementation at ftp-edi.pubnet.org.
      • FTP: CCC command no longer actively sends close_notify TLS message by default.
      • FTP: Fixed a bug in proxy code that caused data transfers to fail when using HTTP CONNECT proxy with NTLM authentication.
      • SFTP: SFTP v4 support added.
      • SFTP: Fixed a bug in CreateDirectory/ChangeDirectory workaround for CoreFTP.
      • SFTP: Added workaround for ProFTPd's mod_sftpd SSH_FXP_REALPATH command that fails for newly created directories.
      • MIME: MailMessage object's BodyText and BodyHtml properties now remove illegal characters when set.
      • MIME: LinkedResource.FileName property added.
      • MIME: Mail messages with empty TNEF/winmail.dat attachment no longer cause an exception to be thrown.
      • S/MIME: Added MimeOptions.SkipCertificateUsageCheck option to make it possible to skip certificate usage check.
      • S/MIME: Fixed a bug that caused an exception to be thrown when signing a mail message on FIPS-enabled systems.
      • SMTP: Kerberos, NTLM and Negotiate authentication methods through GSSAPI/SSPI are now supported (not yet available on .NET Compact Framework).
      • SMTP: GSSAPI or NTLM is also attempted in Auto mode if the mail server doesn't support any other authentication methods.
      • POP3: Kerberos, NTLM and Negotiate authentication methods through GSSAPI/SSPI are now supported (not yet available on .NET Compact Framework).
      • POP3: Added workaround for I&ES Mail Server that doesn't like TOP n 1 command.
      • IMAP: Fixed a bug in Imap object's External authentication method implementation.
      • IMAP: GSSAPI or NTLM is also attempted in Auto mode if the mail server doesn't support any other authentication methods.
      • IMAP: Added a workaround for servers that reply with FETCH BODYSTRUCTURE what FETCH BODY is requested.
      • IMAP: Kerberos, NTLM and Negotiate authentication methods through GSSAPI/SSPI are now supported (not yet available on .NET Compact Framework).
      • IMAP: Message structure parser enhanced to be compatible with more servers and distinguish attachments and linked resources.
      • SSH Shell: Added workaround for SSH packets 101 that some SSH servers were observed to use.
      • Terminal: Fixed a bug that caused Disconnect event not to be raised when some types of connection failures occured.
      • Terminal: TerminalControl now correctly resizes itself when hosted in WPF.
      • SSH Core: Fixed a bug in ArcFour cipher implementation that made it unusable.
      • SSH Core: Fixed a bug that caused an SSH welcome message to be parsed incorrectly when split accross multiple packets.
      • SSH Core: Added support for ZLIB transfer compression.
      • ProxySocket: Proxy object now has Encoding property that makes it possible to specify character set to be used for parsing server responses.
      • ProxySocket: ProxySocketException.ErrorCode property now returns HTTP and Socket4/Socks5 error codes when available.
      • ProxySocket: SspiAuthentication and GssApiProvider classes added that provide GSSAPI/SSPI functionality.
      • Security: Certificate's CRL distribution point list can be accessed using GetCrlDistributionPoints method.

      We are also progressing nicely on Rebex ZIP component as well. If there is something you would like it to support, please visit our customer feedback & ideas forum and add some suggestions!

    • HOWTO: Simulate Ctrl+C programatically in SSH or Telnet

      In some applications written using Rebex SSH Shell or Rebex Telnet that utilize a terminal emulation or virtual terminal, it might be useful to be able to send Ctrl+C sequence programatically. And although this is easy when you know how Ctrl+C actually behaves in Windows, it is definitely not straightforward enough. So this is how you do this:

      C#:

      terminalControl.SendToServer(new ConsoleKeyInfo('\x3', ConsoleKey.C, false, false, true));

      VB.NET:

      terminalControl.SendToServer(New ConsoleKeyInfo(Convert.ToChar(3), ConsoleKey.C, False, False, True))

      (where terminalControl is an instance of TerminalControl or VirtualTerminal class)

      This code creates a ConsoleKeyInfo that simulates a key with ASCII code 3 (ETX special character), console key ‘C’ and a pressed Ctrl key. This simulated keystroke is then sent to the server using the SendToServer method.

      UPDATE: Are your curious why using '\x3' equals to sending Ctrl+C? Do you want to know other common control codes? Check the table in following Wikipedia article: wikipedia.org/wiki/ASCII#ASCII_control_characters

    • Build 3484: Few bugfixes in Secure Mail and SFTP/SSH Shell

      This releases fixes two bugs in the previous build - one in Rebex SFTP and Rebex SSH Shell's GSSAPI/Kerberos authentication, the other in Rebex Secure Mail's SHA-2 signature support.

      Complete list of changes:

      • SSH Core: Fixed a bug in GSSAPI authentication that caused it to work improperly in 32bit .NET Framework.
      • S/MIME: SHA-2 now works with private keys in non-Microsoft key storages (such as Smart Cards) as well.
      These are the only changes - if you don't need this functionality, you can keep using build 3479.
    • New component: Rebex Secure Mail for .NET Compact Framework

      MIME Explorer We have just released a .NET Compact Framework edition of Rebex Secure Mail, our mail SMTP, POP3, IMAP an MIME component.

      With the CF version, you can use all the features of Rebex Secure Mail on Windows Mobile and Pocket PC devices. Samples in C# and VB.NET are available including MIME Explorer.

      Of course, the Compact Framework version of Rebex Secure Mail was added to Rebex Total Pack as well, so if you already have an active subscription, you can download it immediately. For information about upgrading, please contact us!

      See also: Secure Mail component homepage | Download trial | Pricing from $449

    • Build 3479: SHA-2 in Secure Mail, GSSAPI and Kerberos in SFTP and SSH Shell

      SHA-2 support in Secure Mail

      In addition do SHA-1 and MD5 hash algorithms, SHA-2 support was added to Rebex Secure Mail. This includes SHA-256, SHA-384 and SHA-512. Signatures using these algorithms can now be both created and validated. This feature only works in Windows XP SP3, Windows Server 2003 and newer OS's.

      GSSAPI and Kerberos support in SFTP and SSH Shell

      GSSAPI authentication - "gssapi-with-mic" authentication method defined by RFC 4462 - is now supported by Rebex SFTP and Rebex SSH Shell along with Kerberos v5 and NTLM mechanisms. Microsoft SSPI is used as an underlying authentication provider for both. There is a new easy-to-use Login method overload for this authentication method and we will definitely post more information about it soon.

      IEnumerable<T> support added to collections

      This means that you can now use the LINQ query language (and its extension methods) with collections such as SftpItemCollection or AttachmentCollection.

      Complete list of changes:

      • FTP: Added automated UTF-8 detection on modern FTP servers.
      • FTP: Listing parser enhanced to support some non-English month names that sometimes occur in file listings of broken servers.
      • FTP: Fixed a bug that might cause an active FTP connection to immediately time out when executed on an existing but idle connection.
      • FTP: IEnumerable<T> support added to collections for .NET 2.0 and higher.
      • FTP: Ftp.CopyToAnotherServer method can now handle Abort requests.
      • FTP: Bandwidth throttling functionality slowed down the transfer too much when a limited but high speed was requested.
      • SFTP: IEnumerable<T> support added to collections for .NET 2.0 and higher.
      • Mail CF: First public release of the .NET Compact Framework package of Rebex Secure Mail.
      • MIME: Signature parser enhanced to better parse "signed" e-mails with missing signature.
      • MIME: Binary attachments claiming to be text are now parsed as application/octet-stream.
      • MIME: IEnumerable<T> support added to collections for .NET 2.0 and higher.
      • MIME: Fixed a bug in MimeHeaderCollection class that made it possible to add a null header.
      • MIME: Date header parser enhanced to handle invalid ';' characters.
      • S/MIME: Added support for messages signed using algorithms based on SHA-2 (SHA-256, SHA-384 and SHA-512).
      • IMAP: Added workround for Gmail that is unable to select a localized version of the Inbox folder. The inbox folder is now reported as Inbox for all Gmail language variants.
      • IMAP: Fixed a bug in IMAP response parser that caused it to fail in rare circumstances.
      • SSH Shell: Added support for break request defined by RFC 4335.
      • SSH Shell: Added Shell.GetExitCode method to make it possible to retrieve process exit code (if available).
      • Terminal: Fixed bad exception message in TerminalControl.Bind method.
      • Terminal: TerminalOptions serialization fixed to work correctly with serialized data from older releases.
      • Terminal: Fixed a bug in the logging code for SshChannel.SetTerminalSize method.
      • SSH Core: Support for GSSAPI authentication (gssapi-with-mic) added. Kerberos (not on .NET CF) and NTLM mechanisms are supported. MS SSPI is used as an underlying authentication provider.
      • SSH Core: SshFingerprint class extended to support multiple hash algorithms.
      • SSH Core: Added BannerReceived event that ca be used to receive banner messages sent by the server.
      • SSH Core: Added FingerprintCheck event as an alternative way to check server fingerprint.
      • SSH Core: Support for authentication using both username/password and public key at the same time made compatible with Maverick SSHD server.
      • Time: Version number change only.
      • TLS/SSL: Enhanced logging of certificate-related actions during the TLS/SSL negotiation.
      • Security: .PFX/P12 private key file loading support for Windows Mobile 5 and newer.
      • Security: Added support for signatures based on SHA-2 (SHA-256, SHA-384 and SHA-512.
      • Security: If .NET 3.5 is available, a new and much faster AES implementation is used instead of RijndaelManaged.
      • Security: Behavior of certificate finders in CMS/PKCS #7 was enhanced - embedded certificates are always searched now.
      If you know about a missing feature that you would like us to add, please visit our customer feedback & ideas forum to add some suggestions for us!
    • HOWTO: Terminal Color Schemes

      Color schemes is one of the features of our terminal emulator control (part of Rebex SSH Shell and Rebex Telnet) that was added few months ago after one of our users requested it. What is it for? If your application communicates with a monochrome terminal, you can define a custom color scheme to assign some colors to different visual styles to make them more readable. Doing this for a colors-capable terminal application usually doesn’t make much sense (although it is possible as well), but for a monochrome application, it can be a nice visual enhancement.

      Check out the results below – a monochrome “man” command output is on the left and the output of the same command using a custom color scheme is on the right:

      man-mono man-custom

      Defining a color scheme is very simple:

      C#:

      console.Options.ColorScheme = ColorScheme.Custom;
      console.Options.SetColorIndex(SchemeColorName.Background, 0);
      console.Options.SetColorIndex(SchemeColorName.Foreground, 7); //= normal text
      console.Options.SetColorIndex(SchemeColorName.Bold, 11); //= highlighted text
      console.Options.SetColorIndex(SchemeColorName.SingleUnderline, 9);
      console.Options.SetColorIndex(SchemeColorName.DoubleUnderline, 9);
      VB.NET:
      console.Options.ColorScheme = ColorScheme.Custom
      console.Options.SetColorIndex(SchemeColorName.Background, 0)
      console.Options.SetColorIndex(SchemeColorName.Foreground, 7) ' = normal text
      console.Options.SetColorIndex(SchemeColorName.Bold, 11) ' = highlighted
      console.Options.SetColorIndex(SchemeColorName.SingleUnderline, 9)
      console.Options.SetColorIndex(SchemeColorName.DoubleUnderline, 9)
      (where console is an instance of TerminalControl)

      You might be wondering about the numbers - these are indexes to the current color palette which contains the following colors:

      0 Black 8 Dark gray
      1 Red 9 Light red
      2 Green 10 Light green
      3 Yellow 11 Light yellow
      4 Blue 12 Light blue
      5 Magenta 13 Light magenta
      6 Cyan 14 Light cyan
      7 Light gray 15 White


      On the other hand, if you prefer monochrome color scheme instead, you can simply turn color-capable terminals into monochrome by setting TerminalOption’s ColorScheme property to ColorScheme.Monochrome.

      To ensure color changes are applied immediately to the terminal control, you have to call the console.Refresh() method.

       

       

    • HOWTO: Transfer compression in SFTP and SSH Shell

      A feature that is requested very often is integrated transfer compression in Rebex SFTP. This is particularly useful when transferring text files or other highly compressible files, and a similar feature is already included in Rebex FTP. So why does it take so long to add this to SFTP as well? The problem is that the .NET Framework compression API is well-suited to be used in protocols utilizing stream transfer modes such as FTP, but entirely unsuitable for protocols using block transfer mode such as SSH, the underlying protocol used by SFTP.

      Fortunately, since build 3428, it is possible to enable ZLIB compression in Rebex SFTP and Rebex SSH Shell using ZlibStream for .NET, a library build on top of a C# port of JCraft's Java JZlib library. JZlib is a re-implementation of zlib in pure Java. It is covered by a BSD-style license, which makes it possible to be used for free (even in commercial closed-source applications).

      OK, so how to enable transfer compression? It is rather simple – download and install ZlibStream for .NET, add a reference to Rebex.ZlibStream.dll to your application and when connecting to an SFTP server in your code, add few additional lines:

      C#

      Sftp sftp = new Sftp();
      SshParameters parameters = new SshParameters();
      parameters.CompressionStreamType = typeof(Rebex.IO.Compression.JZlib.ZlibOutputStream);
      sftp.Connect(hostname, password, parameters);

      VB.NET

      Dim sftp As New Sftp
      Dim parameters As New SshParameters
      parameters.CompressionStreamType = GetType(Rebex.IO.Compression.JZlib.ZlibOutputStream)
      sftp.Connect(hostname, password, parameters)

      In Rebex SSH Shell, an equivalent code can be used.

      At this point, you may be asking yourself – why is this not included in Rebex components by default? There are two reasons:

      1. A BSD-style license requires that all derivative works reproduce the full text of the license in the source code and documentation. This goes against our philosophy for .NET components - we don’t want our clients to still bother with licensing issues after they purchased a license.
      2. Some of our clients have a strict no-free-software policy that forbids them from using anything based on or derived from a software using an open source license. Therefore, no free or open source code is allowed into the codebase of products we sell.

      To address this, we are currently implementing a new ZLIB compression library from scratch, without using any third-party code. Once this is finished, Rebex SFTP and SSH Shell will finally support transfer compression by default. Until then, simply use ZlibStream for .NET as described above.

    • HOWTO: Download all files from a remote FTP directory and save them to a local disk

      Quick & dirty (yet a bit naive) directory download code

      To download all files in a specified remote folder seems to be a trivial task at first. Calling Ftp.GetList(), iterating through the returned collection and caling Ftp.GetFile() on each item looks like a no brainer. It would work in simple cases. However, there are some caveats in this approach. Consider the following situations:

      • Remote directory has both files and folder with other files. Should we download the content of subdirectories too?
      • What if some of the remote files already exist on the local computer? Should they be overwritten? Skipped? Should we overwrite older files only?
      • What if the local file is not writable? Should the whole transfer fail? Should we skip the file and continue to the next?
      • How to handle files on a remote disk which are unreadable because we don’t have sufficient access rights?
      • How are the symlinks, hard links and junction points handled? Links can easily be used to create an infinite recursive directory tree structure. Consider folder A with subfolder B which in fact is not the real folder but the *nix hard link pointing back to folder A. The naive approach will end in an application which never ends (at least if nobody manage to pull the plug).

      Download the directory – resolve the conflicts automatically

      public static void DownloadFolderSimple()
      {
      using (Ftp client = new Ftp())
      {
      // connect and login to the FTP site
      client.Connect("mirror.aarnet.edu.au");
      client.Login("anonymous", "my@password");

      // download all files
      client.GetFiles(
      "/pub/fedora/linux/development/i386/os/EFI/*",
      "c:\\temp\\download",
      FtpBatchTransferOptions.Recursive,
      FtpActionOnExistingFiles.OverwriteAll
      );

      client.Disconnect();
      }
      }
      The above code solves all the issues mentioned above. The programmer decides how to resolve most conflicts. In this case existing files are overwritten, links are followed and downloaded correctly, infinite link loops are detected and handled by the component code by throwing an exception. Such code is best for unattended processing.

      What if the user needs to choose which local files should be overwritten and which not? What if we want to skip files with certain type of problem? Let’s check another scenario and give this power to the hands of the user.

      Download the directory – let the user resolve the conflicts

      public static void DownloadFolderWithUserInteraction()
      {
      using (Ftp client = new Ftp())
      {
      // connect and login to the FTP site
      client.Connect("mirror.aarnet.edu.au");
      client.Login("anonymous", "my@password");

      // subscribe to the event which occurs when transfer conflict
      // or problem occures
      client.BatchTransferProblemDetected +=
      new FtpBatchTransferProblemDetectedEventHandler
      (client_BatchTransferProblemDetected);

      // download all files
      client.GetFiles(
      "/pub/fedora/linux/development/i386/os/EFI/*",
      "c:\\temp\\download",
      FtpBatchTransferOptions.Recursive
      );

      client.Disconnect();
      }
      }


       


      static void client_BatchTransferProblemDetected(
      object sender,
      FtpBatchTransferProblemDetectedEventArgs e)
      {
      // Problem type can be found in e.ProblemType
      //
      // Actions usable for solving the specific problem
      // can be retrieved by checking flags in e.PossibleActions or
      // by calling e.IsActionPossible method.
      //
      // e.Action = MyTransferrProblemDetecttedDialog.ShowModal(e);
      //
      // See http://www.rebex.net/ftp.net/sample-batch-transfer.aspx
      // for sample implementation.
      }

      Each time the component reaches the point in which a decision has to be made the user is asked. A dialog pops up and the user is given an option to resolve the issue for the specific file or directory. He is also able to resolve all similar cases with one choice - e. g. he is given an option to either  ‘Overwrite a specific file’ or ‘Overwrite all files if older’ as shown on the screeshot.

      To see this approach implemented in a fully functional application download the component and check the FTP Batch Transfer Sample. Both C# and VB.NET code available.

    • New component: Rebex Telnet for .NET - automated shell scripting and terminal emulation

      A new component has just been released: Rebex Telnet for .NET.

      Rebex Telnet terminal emulation and automated shell scripting library for .NET languages (such as C# or VB.NET). It makes it easy to execute commands on Unix/Windows Telnet servers or add terminal emulation capabilities to your applications.

      Features include:

      • Terminal emulation - Windows Forms control and virtual (off-screen) terminal.
      • Shell scripting objects.
      • Terminal session recording and replay.
      • Samples in C# and VB.NET including WinForm Telnet Client.
      • Easy-to-follow tutorial for a quick start.
      • Complete C# source code is optionally available.
      • And more...

      Of course, Rebex Telnet was added to Rebex Total Pack as well, so if you already have an active subscription, you can download it immediately. For information about upgrading, please contact us!

      See also: Telnet component homepage | Download trial | Pricing from $249

    More Posts Next page »
    Powered by Community Server (Personal Edition), by Telligent Systems