Code Monkey home page Code Monkey logo

Comments (11)

FanDjango avatar FanDjango commented on June 12, 2024

Remove this stuff first:

					// sample setting to use the default security suite
					SecuritySuite = GnuSuite.Normal,

					// sample setting to include all TLS protocols except for TLS 1.0 and TLS 1.1
					SecurityOptions = new List<GnuOption> {
						new GnuOption(GnuOperator.Include, GnuCommand.Protocol_All),
						new GnuOption(GnuOperator.Exclude, GnuCommand.Protocol_Tls10),
						new GnuOption(GnuOperator.Exclude, GnuCommand.Protocol_Tls11),
					},

					// no profile required
					SecurityProfile = GnuProfile.None,

					// sample special flags (this is not normally required)
					AdvancedOptions = new List<GnuAdvanced> {
						GnuAdvanced.CompatibilityMode

Then try again and show your exact code and the log again.

from fluentftp.gnutls.

Adwa0428 avatar Adwa0428 commented on June 12, 2024

My code, I new a FTP_Server to run the example:
internal FTP_Server()
{
ConnectFTPSCertificate();
}

public static void ConnectFTPSCertificate()
{
using (var conn = new FtpClient("192.168.100.222", "test", "test1234"))
{
// enable GnuTLS streams for FTP client
conn.Config.CustomStream = typeof(GnuTlsStream);
conn.Config.CustomStreamConfig = new GnuConfig()
{
LogLevel = 1,
/*
// sample setting to use the default security suite
SecuritySuite = GnuSuite.Normal,

		// sample setting to include all TLS protocols except for TLS 1.0 and TLS 1.1
		SecurityOptions = new List<GnuOption> {
			new GnuOption(GnuOperator.Include, GnuCommand.Protocol_All),
			new GnuOption(GnuOperator.Exclude, GnuCommand.Protocol_Tls10),
			new GnuOption(GnuOperator.Exclude, GnuCommand.Protocol_Tls11),
		},

		// no profile required
		SecurityProfile = GnuProfile.None,

		// sample special flags (this is not normally required)
		AdvancedOptions = new List<GnuAdvanced> {
			GnuAdvanced.CompatibilityMode
		},

*/
HandshakeTimeout = 5000,
};

	// connect using Explicit FTPS with TLS 1.3
	conn.Config.EncryptionMode = FtpEncryptionMode.Explicit;
	try
	{
		conn.Connect();
	}
	catch (Exception e)
	{
		Debug_msg.WriteLine("FTPS exception: {0}", e.Message);
	}                
}

}

The test result is still the same:
FTPS exception: Error : *GnuTlsHandShake(...) failed: (-110) GNUTLS_E_PREMATURE_TERMINATION

The Log on FileZilla server:
<31-08-2023 09:36:13> FTP Session 49 192.168.100.223 [Response] 220-FileZilla Server 1.7.2
<31-08-2023 09:36:13> FTP Session 49 192.168.100.223 [Response] 220 Please visit https://filezilla-project.org/
<31-08-2023 09:36:13> FTP Session 49 192.168.100.223 [Command] AUTH TLS
<31-08-2023 09:36:13> FTP Session 49 192.168.100.223 [Response] 234 Using authentication type TLS.
<31-08-2023 09:36:13> FTP Session 49 192.168.100.223 [Error] GnuTLS error -344: No common application protocol could be negotiated.
<31-08-2023 09:36:13> FTP Session 49 192.168.100.223 [Error] Control channel closed with error from source 0. Reason: ECONNABORTED - Connection aborted.

Some information of my project:
I run the .Net 6 project on a Linux hardware, Ubuntu 20.04

The following dll are included in my project:
libgnutls-30.dll
libgcc_s_seh-1.dll
libgmp-10.dll
libhogweed-6.dll
libnettle-8.dll
libwinpthread-1.dll

I can connect to the server successfully only if I removed conn.Config.EncryptionMode = FtpEncryptionMode.Explicit;

from fluentftp.gnutls.

FanDjango avatar FanDjango commented on June 12, 2024

Ok, thanks, this is a good start: Why don't we begin by looking at the log of FluentFTP, and especially the log of FluentFTP.GnuTLS - set the LogLevel to 99 and then rerun, paste the entire log here. This way we will see error messages from GnuTls - specifically which ciphers are being offered.

from fluentftp.gnutls.

FanDjango avatar FanDjango commented on June 12, 2024

To quickly get a log use:

client.LegacyLogger = FTPLogEvent;

and define:

private static void FTPLogEvent(FtpTraceLevel ftpTraceLevel, string logMessage) {
	//Console.WriteLine("*** " + ftpTraceLevel + " " + logMessage);
	Console.WriteLine(logMessage);
}

from fluentftp.gnutls.

Adwa0428 avatar Adwa0428 commented on June 12, 2024

The log are as follows:

>         Connect(False)
Status:   FluentFTP 47.1.0.0(.NET 6.0)
Status:   Connecting to IP #1= ***:21
Status:   Waiting for a response
Response: 220-FileZilla Server 1.7.2
Response: 220 Please visit https://filezilla-project.org/ [738763.063d]
Status:   Detected FTP server: FileZilla
Command:  AUTH TLS
Status:   Waiting for response to: AUTH TLS
Response: 234 Using authentication type TLS. [6ms]
Status:   GnuTLS: 3   Found entry 'gnutls_check_version'
Status:   GnuTLS: 3   Found entry 'gnutls_global_set_log_function'
Status:   GnuTLS: 3   Found entry 'gnutls_global_set_log_level'
Status:   GnuTLS: 3   Found entry 'gnutls_global_init'
Status:   GnuTLS: 3   Found entry 'gnutls_global_deinit'
Status:   GnuTLS: 3   Found entry 'gnutls_free'
Status:   GnuTLS: 3   Found entry 'gnutls_init'
Status:   GnuTLS: 3   Found entry 'gnutls_deinit'
Status:   GnuTLS: 3   Found entry 'gnutls_db_set_cache_expiration'
Status:   GnuTLS: 3   Found entry 'gnutls_session_get_desc'
Status:   GnuTLS: 3   Found entry 'gnutls_protocol_get_name'
Status:   GnuTLS: 3   Found entry 'gnutls_protocol_get_version'
Status:   GnuTLS: 3   Found entry 'gnutls_record_get_max_size'
Status:   GnuTLS: 3   Found entry 'gnutls_alert_get'
Status:   GnuTLS: 3   Found entry 'gnutls_alert_get_name'
Status:   GnuTLS: 3   Found entry 'gnutls_error_is_fatal'
Status:   GnuTLS: 3   Found entry 'gnutls_handshake'
Status:   GnuTLS: 3   Found entry 'gnutls_handshake_set_hook_function'
Status:   GnuTLS: 3   Found entry 'gnutls_bye'
Status:   GnuTLS: 3   Found entry 'gnutls_handshake_set_timeout'
Status:   GnuTLS: 3   Found entry 'gnutls_record_check_pending'
Status:   GnuTLS: 3   Found entry 'gnutls_set_default_priority'
Status:   GnuTLS: 3   Found entry 'gnutls_priority_set_direct'
Status:   GnuTLS: 3   Found entry 'gnutls_set_default_priority_append'
Status:   GnuTLS: 3   Found entry 'gnutls_dh_set_prime_bits'
Status:   GnuTLS: 3   Found entry 'gnutls_transport_set_ptr'
Status:   GnuTLS: 3   Found entry 'gnutls_record_recv'
Status:   GnuTLS: 3   Found entry 'gnutls_record_send'
Status:   GnuTLS: 3   Found entry 'gnutls_session_is_resumed'
Status:   GnuTLS: 3   Found entry 'gnutls_session_get_data2'
Status:   GnuTLS: 3   Found entry 'gnutls_session_set_data'
Status:   GnuTLS: 3   Found entry 'gnutls_session_get_flags'
Status:   GnuTLS: 3   Found entry 'gnutls_alpn_set_protocols'
Status:   GnuTLS: 3   Found entry 'gnutls_alpn_get_selected_protocol'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_allocate_credentials'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_free_credentials'
Status:   GnuTLS: 3   Found entry 'gnutls_credentials_set'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_client_get_request_status'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_verify_peers3'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_type_get2'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_get_peers'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_set_x509_system_trust'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_set_x509_key_mem2'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_init'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_deinit'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_import'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_print'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_export2'
Status:   GnuTLS: 3   Found entry 'gnutls_pcert_import_rawpk_raw'
Status:   GnuTLS: 0   FluentFTP.GnuTLS 1.0.22.0(Unix/.NET 6.0) / GnuTLS 3.6.13
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/dn.c[_gnutls_x509_compare_raw_dn]:990
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/dn.c[_gnutls_x509_compare_raw_dn]:990
Status:   GnuTLS: 5   Internal: REC[0xfffa440b22e0]: Allocating epoch #0
Status:   GnuTLS: 2   Internal: added 4 protocols, 29 ciphersuites, 19 sig algos and 10 groups into priority list
Status:   GnuTLS: 5   Internal: REC[0xfffa440b22e0]: Allocating epoch #1
Status:   GnuTLS: 4   Internal: HSK[0xfffa440b22e0]: Adv. version: 3.3
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (OCSP Status Request/5) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension OCSP Status Request/5 (5 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Client Certificate Type/19) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Server Certificate Type/20) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Supported Groups/10) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group SECP256R1 (0x17)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group SECP384R1 (0x18)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group SECP521R1 (0x19)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group X25519 (0x1d)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group X448 (0x1e)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group FFDHE2048 (0x100)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group FFDHE3072 (0x101)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group FFDHE4096 (0x102)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group FFDHE6144 (0x103)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sent group FFDHE8192 (0x104)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Supported Groups/10 (22 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Supported EC Point Formats/11) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Supported EC Point Formats/11 (2 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (SRP/12) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Signature Algorithms/13) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (4.1) RSA-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.9) RSA-PSS-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.4) RSA-PSS-RSAE-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (4.3) ECDSA-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.7) EdDSA-Ed25519
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (5.1) RSA-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.10) RSA-PSS-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.5) RSA-PSS-RSAE-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (5.3) ECDSA-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.8) EdDSA-Ed448
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (6.1) RSA-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.11) RSA-PSS-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (8.6) RSA-PSS-RSAE-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (6.3) ECDSA-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (2.1) RSA-SHA1
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sent signature algo (2.3) ECDSA-SHA1
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Signature Algorithms/13 (34 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (SRTP/14) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Heartbeat/15) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (ALPN/16) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension ALPN/16 (7 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Encrypt-then-MAC/22) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Extended Master Secret/23) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Session Ticket/35) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Session Ticket/35 (0 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Key Share/51) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sending key share for SECP256R1
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: sending key share for X25519
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Key Share/51 (107 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Supported Versions/43) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Supported Versions/43 (5 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Post Handshake Auth/49) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Safe Renegotiation/65281) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Safe Renegotiation/65281 (1 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Server Name Indication/0) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Cookie/44) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Early Data/42) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (PSK Key Exchange Modes/45) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension PSK Key Exchange Modes/45 (3 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Record Size Limit/28) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension Record Size Limit/28 (2 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Maximum Record Size/1) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (ClientHello Padding/21) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Sending extension ClientHello Padding/21 (173 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa440b22e0]: Preparing extension (Pre Shared Key/41) for 'client hello'
Status:   GnuTLS: 4   Internal: HSK[0xfffa440b22e0]: CLIENT HELLO was queued [512 bytes]
Status:   GnuTLS: 11  Internal: HWRITE: enqueued [CLIENT HELLO] 512. Total 512 bytes.
Status:   GnuTLS: 11  Internal: HWRITE FLUSH: 512 bytes in buffer.
Status:   GnuTLS: 5   Internal: REC[0xfffa440b22e0]: Preparing Packet Handshake(22) with length: 512 and min pad: 0
Status:   GnuTLS: 9   Internal: ENC[0xfffa440b22e0]: cipher: NULL, MAC: MAC-NULL, Epoch: 0
Status:   GnuTLS: 11  Internal: WRITE: enqueued 517 bytes for 0x1d1. Total 517 bytes.
Status:   GnuTLS: 5   Internal: REC[0xfffa440b22e0]: Sent Packet[1] Handshake(22) in epoch 0 and length: 517
Status:   GnuTLS: 11  Internal: HWRITE: wrote 1 bytes, 0 bytes left.
Status:   GnuTLS: 11  Internal: WRITE FLUSH: 517 bytes in buffer.
Status:   GnuTLS: 11  Internal: WRITE: wrote 517 bytes, 0 bytes left.
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1168
Status:   GnuTLS: 10  Internal: READ: Got 0 bytes from 0x1d1
Status:   GnuTLS: 10  Internal: READ: read 0 bytes from 0x1d1
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[_gnutls_io_read_buffered]:593
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/record.c[recv_headers]:1183
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/record.c[_gnutls_recv_in_buffers]:1309
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[_gnutls_handshake_io_recv_int]:1446
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/handshake.c[_gnutls_recv_handshake]:1531
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/handshake.c[handshake_client]:2940
Status:   GnuTLS: 13  Internal: BUF[HSK]: Emptied buffer
Status:   GnuTLS: 0   Error   : *GnuTlsHandShake(...) failed: (-110) GNUTLS_E_PREMATURE_TERMINATION
Status:   Closing/Disposing FtpSocketStream(control connection)
於 FluentFTP.GnuTLS.GnuTlsException 擲回例外狀況: 'FluentFTP.dll'
FTPS exception: Error   : *GnuTlsHandShake(...) failed: (-110) GNUTLS_E_PREMATURE_TERMINATION

And then I found this:
FluentFTP.GnuTLS 1.0.22.0(Unix/.NET 6.0) / GnuTLS 3.6.13
Because I run the dotnet project on Linux, I thought it would use the libgnutls-30.dll to connect.
Maybe it still uses the Linux version GnuTLS library for connection?

I check the gnutls30 version on my Linux platform:
libgnutls30/focal-updates,focal-security,now 3.6.13-2ubuntu1.8 arm64 [installed]
In your suggestion, "It's version should be at least 3.7.x or higher for satisfactory performance."
Would it be the reason I can not create a TLS connection successfully?

from fluentftp.gnutls.

FanDjango avatar FanDjango commented on June 12, 2024

Thank you for the information.

  1. Under linux, FluentFTP.GnuTLS will always search for and use the linux so libraries, which are compiled and installed especially for linux according to the placement design of the linux distro you are using. One cannot use .dll files compiled for Windows systems.

Your 3.6.13 version is from 2020-03-31, which is old, but not terribly old. Let's do some more checking...

  1. To get some more log information (some stuff is still missing for me), and to test a first possible problem (ALPN), can you modify the settings to:
						SetALPNControlConnection = string.Empty,
						SetALPNDataConnection = string.Empty,
						LogLevel = 99,
						LogMessages = GnuMessage.All,

from fluentftp.gnutls.

Adwa0428 avatar Adwa0428 commented on June 12, 2024

The Log are as follows:

>         Connect(False)
Status:   FluentFTP 47.1.0.0(.NET 6.0)
Status:   Connecting to IP #1= ***:21
Status:   Waiting for a response
Response: 220-FileZilla Server 1.7.2
Response: 220 Please visit https://filezilla-project.org/ [738766.082d]
Status:   Detected FTP server: FileZilla
Command:  AUTH TLS
Status:   Waiting for response to: AUTH TLS
Response: 234 Using authentication type TLS. [7ms]
Status:   GnuTLS: 1   Interop : *Load (load .dll libraries
Status:   GnuTLS: 3   Found entry 'gnutls_check_version'
Status:   GnuTLS: 3   Found entry 'gnutls_global_set_log_function'
Status:   GnuTLS: 3   Found entry 'gnutls_global_set_log_level'
Status:   GnuTLS: 3   Found entry 'gnutls_global_init'
Status:   GnuTLS: 3   Found entry 'gnutls_global_deinit'
Status:   GnuTLS: 3   Found entry 'gnutls_free'
Status:   GnuTLS: 3   Found entry 'gnutls_init'
Status:   GnuTLS: 3   Found entry 'gnutls_deinit'
Status:   GnuTLS: 3   Found entry 'gnutls_db_set_cache_expiration'
Status:   GnuTLS: 3   Found entry 'gnutls_session_get_desc'
Status:   GnuTLS: 3   Found entry 'gnutls_protocol_get_name'
Status:   GnuTLS: 3   Found entry 'gnutls_protocol_get_version'
Status:   GnuTLS: 3   Found entry 'gnutls_record_get_max_size'
Status:   GnuTLS: 3   Found entry 'gnutls_alert_get'
Status:   GnuTLS: 3   Found entry 'gnutls_alert_get_name'
Status:   GnuTLS: 3   Found entry 'gnutls_error_is_fatal'
Status:   GnuTLS: 3   Found entry 'gnutls_handshake'
Status:   GnuTLS: 3   Found entry 'gnutls_handshake_set_hook_function'
Status:   GnuTLS: 3   Found entry 'gnutls_bye'
Status:   GnuTLS: 3   Found entry 'gnutls_handshake_set_timeout'
Status:   GnuTLS: 3   Found entry 'gnutls_record_check_pending'
Status:   GnuTLS: 3   Found entry 'gnutls_set_default_priority'
Status:   GnuTLS: 3   Found entry 'gnutls_priority_set_direct'
Status:   GnuTLS: 3   Found entry 'gnutls_set_default_priority_append'
Status:   GnuTLS: 3   Found entry 'gnutls_dh_set_prime_bits'
Status:   GnuTLS: 3   Found entry 'gnutls_transport_set_ptr'
Status:   GnuTLS: 3   Found entry 'gnutls_record_recv'
Status:   GnuTLS: 3   Found entry 'gnutls_record_send'
Status:   GnuTLS: 3   Found entry 'gnutls_session_is_resumed'
Status:   GnuTLS: 3   Found entry 'gnutls_session_get_data2'
Status:   GnuTLS: 3   Found entry 'gnutls_session_set_data'
Status:   GnuTLS: 3   Found entry 'gnutls_session_get_flags'
Status:   GnuTLS: 3   Found entry 'gnutls_alpn_set_protocols'
Status:   GnuTLS: 3   Found entry 'gnutls_alpn_get_selected_protocol'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_allocate_credentials'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_free_credentials'
Status:   GnuTLS: 3   Found entry 'gnutls_credentials_set'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_client_get_request_status'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_verify_peers3'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_type_get2'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_get_peers'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_set_x509_system_trust'
Status:   GnuTLS: 3   Found entry 'gnutls_certificate_set_x509_key_mem2'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_init'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_deinit'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_import'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_print'
Status:   GnuTLS: 3   Found entry 'gnutls_x509_crt_export2'
Status:   GnuTLS: 3   Found entry 'gnutls_pcert_import_rawpk_raw'
Status:   GnuTLS: 1   Interop : *GnuTlsCheckVersion(...)
Status:   GnuTLS: 0   FluentFTP.GnuTLS 1.0.22.0(Unix/.NET 6.0) / GnuTLS 3.6.13
Status:   GnuTLS: 1   Interop : *GnuTlsGlobalSetLogFunction(...)
Status:   GnuTLS: 1   Interop : *GnuTlsGlobalSetLogLevel(...)
Status:   GnuTLS: 1   Interop : *GnuTlsGlobalInit(...)
Status:   GnuTLS: 1   Interop : *.ctor(...):CertificateCredentials
Status:   GnuTLS: 1   Interop : *GnuTlsCertificateSetX509SystemTrust(...)
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/dn.c[_gnutls_x509_compare_raw_dn]:990
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/dn.c[_gnutls_x509_compare_raw_dn]:990
Status:   GnuTLS: 1   Interop : Processed 137 certificates in system X509 trust list
Status:   GnuTLS: 1   Interop : *SetupClientCertificates(...) - currently being implemented
Status:   GnuTLS: 1   Interop : *.ctor(...):Session
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Allocating epoch #0
Status:   GnuTLS: 1   Interop : *GnuTlsDbSetCacheExpiration(...)
Status:   GnuTLS: 1   Interop : *GnuTlsPrioritySetDirect(...)(NORMAL:+VERS-ALL:-VERS-TLS1.0:-VERS-TLS1.1:%COMPAT)
Status:   GnuTLS: 2   Internal: added 4 protocols, 29 ciphersuites, 19 sig algos and 10 groups into priority list
Status:   GnuTLS: 1   Interop : *GnuTlsDhSetPrimeBits(...)
Status:   GnuTLS: 1   Interop : *GnuTlsCredentialsSet(...)
Status:   GnuTLS: 1   Interop : *GnuTlsTransportSetPtr(...)
Status:   GnuTLS: 1   Interop : *GnuTlsHandshakeSetTimeout(...)
Status:   GnuTLS: 1   Interop : *GnuTlsHandshakeSetHookFunction(...)
Status:   GnuTLS: 1   Interop : *GnuTlsHandShake(...)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Allocating epoch #1
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: Adv. version: 3.3
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (OCSP Status Request/5) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension OCSP Status Request/5 (5 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Client Certificate Type/19) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Server Certificate Type/20) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Supported Groups/10) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group SECP256R1 (0x17)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group SECP384R1 (0x18)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group SECP521R1 (0x19)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group X25519 (0x1d)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group X448 (0x1e)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group FFDHE2048 (0x100)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group FFDHE3072 (0x101)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group FFDHE4096 (0x102)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group FFDHE6144 (0x103)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sent group FFDHE8192 (0x104)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Supported Groups/10 (22 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Supported EC Point Formats/11) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Supported EC Point Formats/11 (2 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (SRP/12) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Signature Algorithms/13) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (4.1) RSA-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.9) RSA-PSS-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.4) RSA-PSS-RSAE-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (4.3) ECDSA-SHA256
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.7) EdDSA-Ed25519
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (5.1) RSA-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.10) RSA-PSS-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.5) RSA-PSS-RSAE-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (5.3) ECDSA-SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.8) EdDSA-Ed448
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (6.1) RSA-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.11) RSA-PSS-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (8.6) RSA-PSS-RSAE-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (6.3) ECDSA-SHA512
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (2.1) RSA-SHA1
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sent signature algo (2.3) ECDSA-SHA1
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Signature Algorithms/13 (34 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (SRTP/14) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Heartbeat/15) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (ALPN/16) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Encrypt-then-MAC/22) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Extended Master Secret/23) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Session Ticket/35) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Session Ticket/35 (0 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Key Share/51) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sending key share for SECP256R1
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: sending key share for X25519
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Key Share/51 (107 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Supported Versions/43) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Supported Versions/43 (5 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Post Handshake Auth/49) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Safe Renegotiation/65281) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Safe Renegotiation/65281 (1 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Server Name Indication/0) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Cookie/44) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Early Data/42) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (PSK Key Exchange Modes/45) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension PSK Key Exchange Modes/45 (3 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Record Size Limit/28) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension Record Size Limit/28 (2 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Maximum Record Size/1) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (ClientHello Padding/21) for 'client hello'
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Sending extension ClientHello Padding/21 (184 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Preparing extension (Pre Shared Key/41) for 'client hello'
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: CLIENT HELLO was queued [512 bytes]
Status:   GnuTLS: 1   Interop : Handshake about to send GNUTLS_HANDSHAKE_CLIENT_HELLO
Status:   GnuTLS: 11  Internal: HWRITE: enqueued [CLIENT HELLO] 512. Total 512 bytes.
Status:   GnuTLS: 1   Interop : Handshake sent GNUTLS_HANDSHAKE_CLIENT_HELLO
Status:   GnuTLS: 11  Internal: HWRITE FLUSH: 512 bytes in buffer.
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Preparing Packet Handshake(22) with length: 512 and min pad: 0
Status:   GnuTLS: 9   Internal: ENC[0xfffa6c226a80]: cipher: NULL, MAC: MAC-NULL, Epoch: 0
Status:   GnuTLS: 11  Internal: WRITE: enqueued 517 bytes for 0xf0. Total 517 bytes.
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Sent Packet[1] Handshake(22) in epoch 0 and length: 517
Status:   GnuTLS: 11  Internal: HWRITE: wrote 1 bytes, 0 bytes left.
Status:   GnuTLS: 11  Internal: WRITE FLUSH: 517 bytes in buffer.
Status:   GnuTLS: 11  Internal: WRITE: wrote 517 bytes, 0 bytes left.
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1168
Status:   GnuTLS: 10  Internal: READ: Got 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 0 bytes into buffer. Adding 5 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 5 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: SSL 3.3 Handshake packet received. Epoch 0, length: 123
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Expected Packet Handshake(22)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Received Packet Handshake(22) with length: 123
Status:   GnuTLS: 10  Internal: READ: Got 123 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 123 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 5 bytes into buffer. Adding 123 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 128 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Decrypted Packet[0] Handshake(22) with length: 123
Status:   GnuTLS: 13  Internal: BUF[REC]: Inserted 123 bytes of Data(22)
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: SERVER HELLO (2) was received. Length 119[119], frag offset 0, frag length: 119, sequence: 0
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1159
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[_gnutls_handshake_io_recv_int]:1411
Status:   GnuTLS: 1   Interop : Handshake received GNUTLS_HANDSHAKE_SERVER_HELLO
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: Server's version: 3.3
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Parsing extension 'Supported Versions/43' (2 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Negotiated version: 3.4
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: Selected cipher suite: GNUTLS_AES_256_GCM_SHA384
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Parsing extension 'Key Share/51' (69 bytes)
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: Selected group SECP256R1 (2)
Status:   GnuTLS: 2   Internal: EXT[0xfffa6c226a80]: client generated SECP256R1 shared key
Status:   GnuTLS: 1   Interop : Handshake processed GNUTLS_HANDSHAKE_SERVER_HELLO
Status:   GnuTLS: 11  Internal: HWRITE: enqueued [CHANGE CIPHER SPEC] 1. Total 1 bytes.
Status:   GnuTLS: 11  Internal: HWRITE FLUSH: 1 bytes in buffer.
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Preparing Packet ChangeCipherSpec(20) with length: 1 and min pad: 0
Status:   GnuTLS: 9   Internal: ENC[0xfffa6c226a80]: cipher: NULL, MAC: MAC-NULL, Epoch: 0
Status:   GnuTLS: 11  Internal: WRITE: enqueued 6 bytes for 0xf0. Total 6 bytes.
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Sent Packet[2] ChangeCipherSpec(20) in epoch 0 and length: 6
Status:   GnuTLS: 11  Internal: HWRITE: wrote 1 bytes, 0 bytes left.
Status:   GnuTLS: 11  Internal: WRITE FLUSH: 6 bytes in buffer.
Status:   GnuTLS: 11  Internal: WRITE: wrote 6 bytes, 0 bytes left.
Status:   GnuTLS: 4   Internal: REC[0xfffa6c226a80]: Sent ChangeCipherSpec
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Initializing epoch #1
Status:   GnuTLS: 9   Internal: INT: CLIENT WRITE KEY [32]: 26557530d8baffa4ee3ab219244e16185aaaddcd403e33b8c391a857b92277b8
Status:   GnuTLS: 9   Internal: INT: SERVER WRITE KEY [32]: d130abe5020dbb81f3c3bf09f3719ab42f514ba6583d77be22782e682da750ad
Status:   GnuTLS: 9   Internal: INT: CLIENT WRITE IV [12]: 41ac92f7254dfb638873c961
Status:   GnuTLS: 9   Internal: INT: SERVER WRITE IV [12]: 005afc94cd8aaeda358a2c9a
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Epoch #1 ready
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: TLS 1.3 re-key with cipher suite: GNUTLS_AES_256_GCM_SHA384
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1168
Status:   GnuTLS: 10  Internal: READ: Got 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 0 bytes into buffer. Adding 5 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 5 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: SSL 3.3 ChangeCipherSpec packet received. Epoch 1, length: 1
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Expected Packet Handshake(22)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Received Packet ChangeCipherSpec(20) with length: 1
Status:   GnuTLS: 10  Internal: READ: Got 1 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 1 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 5 bytes into buffer. Adding 1 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 6 bytes
Status:   GnuTLS: 10  Internal: discarding change cipher spec in TLS1.3
Status:   GnuTLS: 10  Internal: READ: Got 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 0 bytes into buffer. Adding 5 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 5 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: SSL 3.3 Application Data packet received. Epoch 1, length: 29
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Expected Packet Handshake(22)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Received Packet Application Data(23) with length: 29
Status:   GnuTLS: 10  Internal: READ: Got 29 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 29 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 5 bytes into buffer. Adding 29 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 34 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Decrypted Packet[0] Handshake(22) with length: 12
Status:   GnuTLS: 13  Internal: BUF[REC]: Inserted 12 bytes of Data(22)
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: ENCRYPTED EXTENSIONS (8) was received. Length 8[8], frag offset 0, frag length: 8, sequence: 0
Status:   GnuTLS: 1   Interop : Handshake received GNUTLS_HANDSHAKE_ENCRYPTED_EXTENSIONS
Status:   GnuTLS: 1   Interop : Handshake processed GNUTLS_HANDSHAKE_ENCRYPTED_EXTENSIONS
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: parsing encrypted extensions
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: Parsing extension 'Record Size Limit/28' (2 bytes)
Status:   GnuTLS: 4   Internal: EXT[0xfffa6c226a80]: record_size_limit 16385 negotiated
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1168
Status:   GnuTLS: 10  Internal: READ: Got 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 0 bytes into buffer. Adding 5 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 5 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: SSL 3.3 Application Data packet received. Epoch 1, length: 590
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Expected Packet Handshake(22)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Received Packet Application Data(23) with length: 590
Status:   GnuTLS: 10  Internal: READ: Got 590 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 590 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 5 bytes into buffer. Adding 590 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 595 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Decrypted Packet[1] Handshake(22) with length: 573
Status:   GnuTLS: 13  Internal: BUF[REC]: Inserted 573 bytes of Data(22)
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: CERTIFICATE (11) was received. Length 569[569], frag offset 0, frag length: 569, sequence: 0
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1159
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[_gnutls_handshake_io_recv_int]:1411
Status:   GnuTLS: 1   Interop : Handshake received GNUTLS_HANDSHAKE_CERTIFICATE_PKT
Status:   GnuTLS: 1   Interop : Handshake processed GNUTLS_HANDSHAKE_CERTIFICATE_PKT
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: parsing certificate message
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1168
Status:   GnuTLS: 10  Internal: READ: Got 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 0 bytes into buffer. Adding 5 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 5 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: SSL 3.3 Application Data packet received. Epoch 1, length: 95
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Expected Packet Handshake(22)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Received Packet Application Data(23) with length: 95
Status:   GnuTLS: 10  Internal: READ: Got 95 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 95 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 5 bytes into buffer. Adding 95 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 100 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Decrypted Packet[2] Handshake(22) with length: 78
Status:   GnuTLS: 13  Internal: BUF[REC]: Inserted 78 bytes of Data(22)
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: CERTIFICATE VERIFY (15) was received. Length 74[74], frag offset 0, frag length: 74, sequence: 0
Status:   GnuTLS: 1   Interop : Handshake received GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY
Status:   GnuTLS: 1   Interop : Handshake processed GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: Parsing certificate verify
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: verifying TLS 1.3 handshake data using ECDSA-SECP256R1-SHA256
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/buffers.c[get_last_packet]:1168
Status:   GnuTLS: 10  Internal: READ: Got 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 5 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 0 bytes into buffer. Adding 5 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 5 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: SSL 3.3 Application Data packet received. Epoch 1, length: 69
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Expected Packet Handshake(22)
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Received Packet Application Data(23) with length: 69
Status:   GnuTLS: 10  Internal: READ: Got 69 bytes from 0xf0
Status:   GnuTLS: 10  Internal: READ: read 69 bytes from 0xf0
Status:   GnuTLS: 10  Internal: RB: Have 5 bytes into buffer. Adding 69 bytes.
Status:   GnuTLS: 10  Internal: RB: Requested 74 bytes
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Decrypted Packet[3] Handshake(22) with length: 52
Status:   GnuTLS: 13  Internal: BUF[REC]: Inserted 52 bytes of Data(22)
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: FINISHED (20) was received. Length 48[48], frag offset 0, frag length: 48, sequence: 0
Status:   GnuTLS: 1   Interop : Handshake received GNUTLS_HANDSHAKE_FINISHED
Status:   GnuTLS: 1   Interop : Handshake processed GNUTLS_HANDSHAKE_FINISHED
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: parsing finished
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: sending finished
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: FINISHED was queued [52 bytes]
Status:   GnuTLS: 1   Interop : Handshake about to send GNUTLS_HANDSHAKE_FINISHED
Status:   GnuTLS: 11  Internal: HWRITE: enqueued [FINISHED] 52. Total 52 bytes.
Status:   GnuTLS: 1   Interop : Handshake sent GNUTLS_HANDSHAKE_FINISHED
Status:   GnuTLS: 11  Internal: HWRITE FLUSH: 52 bytes in buffer.
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Preparing Packet Handshake(22) with length: 52 and min pad: 0
Status:   GnuTLS: 9   Internal: ENC[0xfffa6c226a80]: cipher: AES-256-GCM, MAC: AEAD, Epoch: 1
Status:   GnuTLS: 11  Internal: WRITE: enqueued 74 bytes for 0xf0. Total 74 bytes.
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Sent Packet[1] Handshake(22) in epoch 1 and length: 74
Status:   GnuTLS: 11  Internal: HWRITE: wrote 1 bytes, 0 bytes left.
Status:   GnuTLS: 11  Internal: WRITE FLUSH: 74 bytes in buffer.
Status:   GnuTLS: 11  Internal: WRITE: wrote 74 bytes, 0 bytes left.
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/constate.c[_gnutls_epoch_get]:931
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Allocating epoch #2
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Initializing epoch #2
Status:   GnuTLS: 9   Internal: INT: CLIENT WRITE KEY [32]: 15c0725776217bbc80f1138560e6f58c9031e0f1993939d708355a8f75450840
Status:   GnuTLS: 9   Internal: INT: SERVER WRITE KEY [32]: 5fb9f21ae92c9e9925b46da93478c608831e7cec6cb9976d6cd09d5d909c8deb
Status:   GnuTLS: 9   Internal: INT: CLIENT WRITE IV [12]: f4e6b816571132b54bfeb755
Status:   GnuTLS: 9   Internal: INT: SERVER WRITE IV [12]: b340d6ad0840e3c33a9c7b2a
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Epoch #2 ready
Status:   GnuTLS: 4   Internal: HSK[0xfffa6c226a80]: TLS 1.3 re-key with cipher suite: GNUTLS_AES_256_GCM_SHA384
Status:   GnuTLS: 13  Internal: BUF[HSK]: Emptied buffer
Status:   GnuTLS: 13  Internal: BUF[HSK]: Emptied buffer
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Start of epoch cleanup
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Epoch #0 freed
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: Epoch #1 freed
Status:   GnuTLS: 5   Internal: REC[0xfffa6c226a80]: End of epoch cleanup
Status:   GnuTLS: 1   Interop : *GnuTlsProtocolGetVersion(...)
Status:   GnuTLS: 1   Interop : *GnuTlsProtocolGetName(...)
Status:   GnuTLS: 1   Interop : *GnuTlsSessionGetDesc(...)
Status:   GnuTLS: 1   Interop : *GnuTlsAlpnGetSelectedProtocol(...)
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/ext/alpn.c[gnutls_alpn_get_selected_protocol]:246
Status:   GnuTLS: 1   Interop : *GnuTlsRecordGetMaxSize(...)
Status:   GnuTLS: 1   Interop : Maximum record size: 16384
Status:   GnuTLS: 1   Interop : *GnuTlsCertificateClientGetRequestStatus(...)
Status:   GnuTLS: 1   Interop : Server did not request client certificate
Status:   GnuTLS: 1   Interop : *GnuTlsCertificateVerifyPeers3(...)
Status:   GnuTLS: 3   Internal: ASSERT: ../../lib/ocsp-api.c[gnutls_ocsp_status_request_get2]:98
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/verify.c[verify_crt]:678
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/verify.c[verify_crt]:830
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/verify.c[_gnutls_verify_crt_status]:1022
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/x509_ext.c[gnutls_subject_alt_names_get]:110
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/x509.c[get_alt_name]:1853
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/verify-high.c[gnutls_x509_trust_list_verify_crt2]:1401
Status:   GnuTLS: 1   Interop : Internal server certificate validation function reports:
Status:   GnuTLS: 1   Interop : INVALID, SIGNER_NOT_FOUND, UNEXPECTED_OWNER
Status:   GnuTLS: 1   Interop : *GnuTlsCertificateTypeGet2(...)
Status:   GnuTLS: 1   Interop : *GnuTlsCertificateGetPeers(...)
Status:   GnuTLS: 1   Interop : Certificate type: X.509, list contains 1 certificate
Status:   GnuTLS: 1   Interop : Certificate #1
Status:   GnuTLS: 1   Interop : *GnuTlsX509CrtInit(...)
Status:   GnuTLS: 1   Interop : *GnuTlsX509CrtImport(...)
Status:   GnuTLS: 1   Interop : *GnuTlsX509CrtPrint(...)
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/nettle/mpi.c[wrap_nettle_mpi_print]:60
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/nettle/mpi.c[wrap_nettle_mpi_print]:60
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_issuer_unique_id]:3989
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_subject_unique_id]:3939
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/common.c[_gnutls_copy_data]:1618
Status:   GnuTLS: 3   Internal: ASSERT: ../../../lib/x509/x509.c[gnutls_x509_crt_get_signature]:1160
Status:   GnuTLS: 1   Interop : X.509 Certificate Information:
	Version: 3
	Serial Number (hex): d5d781aaa58a00f8f81c0157bcff0c3a63221524
	Issuer: [email protected],OU=RD3,O=ICPDAS,L=Taipei,ST=Taiwan,C=11,CN=WISE
	Validity:
		Not Before: Tue Aug 22 05:38:43 UTC 2023
		Not After: Thu Aug 22 05:43:43 UTC 2024
	Subject: [email protected],OU=RD3,O=ICPDAS,L=Taipei,ST=Taiwan,C=11,CN=WISE
	Subject Public Key Algorithm: EC/ECDSA
	Algorithm Security Level: High (256 bits)
		Curve:	SECP256R1
		X:
			00:df:c7:4d:60:a4:77:0c:73:43:af:b0:ed:17:7f:de
			b1:08:38:1d:f5:d4:d1:ff:89:05:9a:8f:8a:61:80:54
			f0
		Y:
			00:8a:ef:23:53:29:8b:55:70:90:76:99:1a:82:3e:02
			53:4e:e6:a8:97:d8:8d:01:03:45:d5:02:b8:f4:24:77
			d9
	Extensions:
		Key Usage (critical):
			Digital signature.
			Key encipherment.
		Basic Constraints (critical):
			Certificate Authority (CA): FALSE
	Signature Algorithm: ECDSA-SHA256
	Signature:
		30:45:02:21:00:de:cd:ef:af:12:17:85:34:14:6d:42
		f1:01:21:d3:31:10:3f:d2:2b:fe:c2:5e:bf:76:61:11
		5c:42:5b:55:cc:02:20:21:62:e2:c0:24:fb:3c:24:db
		8b:24:b6:d3:c1:14:a3:be:6b:19:dc:2d:0b:0e:1c:78
		42:66:65:55:f5:da:38
Other Information:
	Fingerprint:
		sha1:bda4fb9ff8b5b7ecd22a5b5f33f517ddd28ca460
		sha256:ba0312e83b474b30a8f4c47ed0b2e27739aa05ebbd2a16130b67643178d8a3e3
	Public Key ID:
		sha1:0fce3ce4dd32391fd0e25fdc1c45b001b117f7eb
		sha256:6e348236f3162c783b6840e075664b5f0bbf7edbe1e07017a562972154c0d38c
	Public Key PIN:
		pin-sha256:bjSCNvMWLHg7aEDgdWZLXwu/ftvh4HAXpWKXIVTA04w=
Status:   GnuTLS: 1   Interop : *GnuTlsFree(...)
Status:   GnuTLS: 1   Interop : *GnuTlsX509CrtExport2(...)
Status:   GnuTLS: 1   Interop : *GnuTlsX509CrtDeinit(...)
Status:   GnuTLS: 1   Interop : The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
Error:    FTPS Authentication failed, lib = FluentFTP.GnuTLS.GnuTlsStream
Error:    The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
Error:    Certificate validation failure: INVALID, SIGNER_NOT_FOUND, UNEXPECTED_OWNER
Status:   Closing/Disposing FtpSocketStream(control connection)
於 System.Security.Authentication.AuthenticationException 擲回例外狀況: 'FluentFTP.dll'
已載入 '/usr/bin/WISE/System.Diagnostics.StackTrace.dll'。已略過載入符號。模組已最佳化,並已啟用 [Just My Code] 偵錯工具選項。
已載入 '/usr/bin/WISE/System.Reflection.Metadata.dll'。已略過載入符號。模組已最佳化,並已啟用 [Just My Code] 偵錯工具選項。
已載入 '/usr/bin/WISE/System.Collections.Immutable.dll'。已略過載入符號。模組已最佳化,並已啟用 [Just My Code] 偵錯工具選項。
已載入 '/usr/bin/WISE/System.IO.MemoryMappedFiles.dll'。已略過載入符號。模組已最佳化,並已啟用 [Just My Code] 偵錯工具選項。
FTPS exception: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
>         Dispose()
Status:   Disposing FtpClient object...
Status:   Closing/Disposing FtpSocketStream(control connection)

from fluentftp.gnutls.

FanDjango avatar FanDjango commented on June 12, 2024

Thank you for the detailed log.

The problem is now solved.

It is alway like this if one makes two changes.

  1. More detailed log

This can never hurt, but the actual change that fixed things was:

  1. Turn off ALPN
						SetALPNControlConnection = string.Empty,
						SetALPNDataConnection = string.Empty,

You could test again with no more detailed log, if you want. But even in your log you can see that the handshake no longer has a premature end. It succeeds. (!))

Things now (with ALPN turned off) fail at a very understandable new point: You need to accept the remote certificate and then all will be well.

Look in the log:

Status:   GnuTLS: 1   Interop : Handshake sent GNUTLS_HANDSHAKE_FINISHED

and then later:

Status:   GnuTLS: 1   Interop : The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
Error:    FTPS Authentication failed, lib = FluentFTP.GnuTLS.GnuTlsStream
Error:    The remote certificate was rejected by the provided RemoteCertificateValidationCallback.
Error:    Certificate validation failure: INVALID, SIGNER_NOT_FOUND, UNEXPECTED_OWNER
Status:   Closing/Disposing FtpSocketStream(control connection)
FTPS exception: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.

You could do:

					client.Config.ValidateAnyCertificate = true;

from fluentftp.gnutls.

Adwa0428 avatar Adwa0428 commented on June 12, 2024

It works! Thanks for your help!

I know I have to add client.Config.ValidateAnyCertificate = true;, but I forget to add it into the example.
Therefore, the key is to set SetALPNControlConnection and SetALPNDataConnection as empty.
I have no idea about this. I check the default settings are "ftp" and "ftp-data".
Why would it help to set them as empty for FTP connection with TLS? Is there any document about these parameters?
Thanks.

from fluentftp.gnutls.

FanDjango avatar FanDjango commented on June 12, 2024

Therefore, the key is to set SetALPNControlConnection and SetALPNDataConnection as empty.
Why would it help to set them as empty for FTP connection with TLS?

Depends on the server configuration, I suppose.

Is there any document about these parameters?

Google is your friend or the RFCs.

Note: Up to now, I am undecided what would be a good default for these parameters. Perhaps we should disable them as the standard value. But up to now, most connections either need these parameters or don't care if they are set. So....

from fluentftp.gnutls.

Adwa0428 avatar Adwa0428 commented on June 12, 2024

OK. I wiil try to connect with other FTP servers. Any further updates I will let you know.
Thank you for your efforts.

from fluentftp.gnutls.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.