Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
–1 vote
204 views
in FAQ: edtFTPnet/PRO by (161k points)

When connecting with version 12.0 or later, a customer reported this stack trace in the SecureSocket class:

Exception during handshake  
  Org.BouncyCastle.Tls.TlsFatalAlert: handshake_failure(40)
  at Org.BouncyCastle.Tls.TlsProtocol.SafeReadRecord() 
  at Org.BouncyCastle.Tls.TlsProtocol.OfferInput(Byte[] input, Int32 inputOff, Int32 inputLen) 
  at EnterpriseDT.Mentalis.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult ar)

1 Answer

0 votes
by (161k points)

One cause of this is that the server does not support the extended master secret TLS security feature. WS_FTP server is an example of a server that does not do this. The client terminates the connection, because it is expecting support. 

To get around the issue, disable use of the extended master secret prior to connection:

ftpConnection.SessionResumptionRequiresExtendedMasterSecret = false;

...