WebDAV with untrusted SSL cert from .NET
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.
System.ArgumentException: SessionOptions.TlsHostCertificateFingerprint or SessionOptions.GiveUpSecurityAndAcceptAnyTlsHostCertificate is set, but SessionOptions.FtpSecure is FtpSecure.None.
System.ArgumentException: SessionOptions.FtpSecure is not FtpSecure.None, but SessionOptions.Protocol is not Protocol.Ftp.