Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: WebDAV with untrusted SSL cert from .Net

@Peterpan: No idea what you mean. The bug was fixed in 5.7.1, which was released on 2015-03-25 (over a year ago). The current stable version is 5.7.7, released on 2016-03-06.
Peterpan

Re: WebDAV with untrusted SSL cert from .Net

I can't find the latest version to download. I went to download link (https://winscp.net/eng/download.php), but that is the version modified on 6/3/2016, which is before the fixed one.
Please help.
kyle@...

Re: WebDAV with untrusted SSL cert from .Net

Hi, can I have this version please.
fvboegeld

Thanks

Its working perfect now!

Frederik
martin

@fvboegeld: Sent.
fvboegeld

Hello,

I'm having the same issue with SSL WebDAV.

Can I also give this dev version a try?

Thanks!
Frederik
semery

Re: WebDAV with untrusted SSL cert from .Net

Dev version works great! Thanks!
martin

Re: WebDAV with untrusted SSL cert from .Net

Thanks for your report.

That's a bug, will fix it.

Meanwhile, you can download source code of WinSCP and modify the check in Session.SessionOptionsToOpenSwitches.

Instead of
if (sessionOptions.FtpSecure == FtpSecure.None)

use
if ((sessionOptions.FtpSecure == FtpSecure.None) && !sessionOptions.WebdavSecure)
semery

WebDAV with untrusted SSL cert from .NET

WinSCP version: 5.7 (https://winscp.net/download/winscp570automation.zip/download)

I am trying to connect to a WebDAV server with a self-signed certificate using the .NET assembly. I can connect to the same server with the WebDAV protocol on a different port (and with the WinSCP GUI) without SSL but I can't figure out the correct options to set to get SSL working.

If I don't supply the server's host certificate fingerprint, I get the error (as expected):
WinSCP.SessionRemoteException: Server certificate verification failed: certificate issued for a different hostname, issuer is not trusted ---> WinSCP.SessionRemoteException: Connection failed.

If I supply the certificate fingerprint with SessionOptions.TlsHostCertificateFingerprint, I get the error:
System.ArgumentException: SessionOptions.TlsHostCertificateFingerprint or SessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate is set, but SessionOptions.FtpSecure is FtpSecure.None.

So then if I set SessionOptions.FtpSecure to FtpSecure.Implicit, I get the error:
System.ArgumentException: SessionOptions.FtpSecure is not FtpSecure.None, but SessionOptions.Protocol is not Protocol.Ftp.

Is there anything else I can try?