Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
281 views
in .NET FTP by (210 points)

The documentation on the SSLFTPSSLVersion enumeration states that DETECT will "detect if the server requests TLS1.0 or TLS 1.1" (as found here:  https://enterprisedt.com/products/edtftpnetpro/doc/manual/api/html/T_EnterpriseDT_Net_Ftp_Ssl_SSLFTPSSLVersion.htm).  Now that version 9.0+ also supports TLS 1.2, will DETECT work for sites that require TLS 1.2?

The reason I ask is because I connect to different sites that have various levels of TLS compatibility (some require TLS 1.0, while others will soon require TLS 1.2).  I'd like to be able to set the version to DETECT and let the library do the work of figuring out which one is required.

As a secondary question, is there a way to determine which TLS version is used on an open connection?  For example, is there a property that I can write to the logs to indicate the TLS version used?

Additional info:

My implementation uses SSLFTPClient.

Here is some sample code that I'm using:

SSLFTPClient FTPS = new SSLFTPClient
{
    LicenseOwner = "myCompany",
    LicenseKey = "myLicenseKey",
    RemoteHost = "myHostAddress",
    IsImplicitFTPS = false,
    ServerValidation = SecureFTPServerValidationType.None              
};

var client = SSLFTPCertificate.CreateFromPFX(@"C:\path\to\my\file.pfx", "myCertPassword", true);
FTPS.ClientCertificate = client;
FTPS.Connect();
FTPS.Auth(SSLFTPSSLVersion.DETECT, true);
FTPS.Login("myUsername", "myPassword");
//Log TLS version here

 

1 Answer

0 votes
by (162k points)
selected by
 
Best answer
Yes, DETECT will now also work for TLS 1.2 sites. We'll amend the documentation.

Categories

...