A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/robinrodricks/FluentFTP/wiki/FTPS-Connection-using-GnuTLS below:

FTPS Connection using GnuTLS · robinrodricks/FluentFTP Wiki · GitHub

FluentFTP normally uses .NET SslStream/SChannel for secure encrypted connections. This combination unfortunately currently does not support TLS 1.3 on MS Windows systems.

Therefore we integrated the powerful GnuTLS networking library, a C library that supports TLS 1.3 and also supports much more secure authentication methods, as an alternative secure and encrypted transport medium.

We developed a high-level .NET wrapper for GnuTLS called FluentFTP.GnuTLS, which works on Windows, Unix and Mac OSX.

All credits for the development and testing of our GnuTLS FTP stream and wrapper go to Michael Stiemke.

It is published as an independent Nuget FluentFTP.GnuTLS, and integrates with the FluentFTP client object. See the diagram below for a visual explanation.

Note: This feature is bound by the LGPL 2.1 license so you CAN use it for commercial applications if you don't modify it.

Using GnuTLS FTP streams gives many benefits:

All these settings are properties of the FtpClient object.

All these settings are properties of the GnuConfig object.

Value Effect 0 To suppress GnuTls related messages entirely 1 To see messages originating in the GnuTls wrapper (labelled "Interop"). You can further customize which messages are logged using the LogMessages option. 3 to 99 To add messages from GnuTls processes (labelled "Internal"). How do I connect with TLS 1.3?

To use GnuTLS to connect to your FTP server:

  1. Add the FluentFTP and FluentFTP.GnuTLS Nuget packages to your project.
  2. Add this code where you create your FtpClient:
using FluentFTP.GnuTLS;
using FluentFTP.GnuTLS.Enums;

var client = new FtpClient(...); // or new AsyncFtpClient(...);
client.Config.CustomStream = typeof(GnuTlsStream);
client.Config.CustomStreamConfig = new GnuConfig(){ 
   // optional configuration
   SecuritySuite = GnuSuite.Secure128
};
client.Connect();
// now you can perform any FTP operations using client.XYZ()

All further code then transparently uses GnuTlsStream instead of SslStream for FTPS communications.

All FTPS operations and API can be used as usual with no further changes to your code.

Why is GnuTLS packaged seperately?

We have a separate repository for GnuTLS because it uses a license that is incompatible with our MIT license. It uses LGPL v2.

We publish GnuTLS as a separate Nuget because it adds dependencies on C library DLLs:

How do I install the required libraries?

For Windows, we package the GnuTLS C library as pre-compiled DLLs within our Nuget package.

It is automatically copied into your project and linked for usage by your build process.

You need to have the GnuTLS library installed on your system, it is NOT packaged along with our nuget package.

  1. Many distros already have GnuTLS installed. It's version should be at least 3.7.x or higher for satisfactory performance. This library should be automatically located and loaded.
  2. You can use the package manager of your distro to install libgnutls30 in the standard fashion, but in many cases it will not get you the required version (3.7.x+)
  3. You can get the source code and build the libraries from source

The DllImport process on Linux will find the package because the files will be in the library search path. No need to copy or move the lib to anywhere.

Run this to verify that GnuTLS is installed on Debian 11 Bullseye:

> apt list --installed | grep gnutls30

libgnutls30/stable,stable-security,now 3.7.1-5+deb11u3 amd64 [installed]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4