TLS connection error/bug

Advertisement

robbone
Joined:
Posts:
2

TLS connection error/bug

I'm trying to do a TLS connection but I'm receivin a SSH error, it seems a bug.

Here my code:
SessionOptions sessionOptions = new SessionOptions();
                sessionOptions.HostName = _hostName;
                sessionOptions.Password = _password;
                sessionOptions.UserName = _userName;
                sessionOptions.Protocol = Protocol.Ftp;
                sessionOptions.FtpSecure = FtpSecure.Implicit;
                sessionOptions.PortNumber = 990;
                sessionOptions.FtpMode = FtpMode.Passive;

If I set:
sessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate = true;

I get the error:
System.ArgumentException: SessionOptions.SshHostKey or SessionOptions.GiveUpSecurityAndAcceptAnySshHostKey is set, but SessionOptions.Protocol is not Protocol.Sftp nor Protocol.Scp.

If I set:
sessionOptions.GiveUpSecurityAndAcceptAnySshHostKey

I get the same error above.

If I set:
sessionOptions.TlsHostCertificateFingerprint = "61:79:71...";

I get teh same error above, again

If I set
sessionOptions.SshHostKeyFingerprint = "61:79:71..."

I get the error:
System.ArgumentException: SSH host key fingerprint "61:79:71..." does not match pattern /((ssh-rsa|ssh-dss)( |-))?(\d+ )?([0-9a-f]{2}(:|-)){15}[0-9a-f]{2}(;((ssh-rsa|ssh-dss)( |-))?(\d+ )?([0-9a-f]{2}(:|-)){15}[0-9a-f]{2})*/

When I set TLS properties, the error says that I'm using SSH properties. So I believe it is a bug.

Can anyone help me?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,469
Location:
Prague, Czechia

Re: TLS connection error/bug

Are you using the latest version of WinSCP? I cannot reproduce either of the problems you have reported (of course except for those error messages that are correct).
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum