Client Certificates

Advertisement

dinosaurus
Joined:
Posts:
2
Location:
Netherlands

Client Certificates

Hi,

I really like the .net assembly :roll:
one question though..
It seems not possible to add a client certificate to the session as there is no member/property available.

How can I add a client certificate to the .sessionoptions (via powershell) ?

We are using Version 5.7.6.0 of the .net assembly.

https://winscp.net/eng/docs/library_sessionoptions
string TlsClientCertificatePath
Full path to TLS/SSL client certificate.

TypeName: WinSCP.SessionOptions

Name MemberType Definition
---- ---------- ----------
AddRawSettings Method void AddRawSettings(string setting, string value)
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ParseUrl Method void ParseUrl(string url)
ToString Method string ToString()
FtpMode Property WinSCP.FtpMode FtpMode {get;set;}
FtpSecure Property WinSCP.FtpSecure FtpSecure {get;set;}
GiveUpSecurityAndAcceptAnySshHostKey Property bool GiveUpSecurityAndAcceptAnySshHostKey {get;set;}
GiveUpSecurityAndAcceptAnyTlsHostCertificate Property bool GiveUpSecurityAndAcceptAnyTlsHostCertificate {get;set;}
HostName Property string HostName {get;set;}
Password Property string Password {get;set;}
PortNumber Property int PortNumber {get;set;}
Protocol Property WinSCP.Protocol Protocol {get;set;}
SecurePassword Property securestring SecurePassword {get;set;}
SshHostKeyFingerprint Property string SshHostKeyFingerprint {get;set;}
SshPrivateKeyPassphrase Property string SshPrivateKeyPassphrase {get;set;}
SshPrivateKeyPath Property string SshPrivateKeyPath {get;set;}
Timeout Property timespan Timeout {get;set;}
TimeoutInMilliseconds Property int TimeoutInMilliseconds {get;set;}
TlsHostCertificateFingerprint Property string TlsHostCertificateFingerprint {get;set;}
UserName Property string UserName {get;set;}
WebdavRoot Property string WebdavRoot {get;set;}
WebdavSecure Property bool WebdavSecure {get;set;} :?: :?: :?:

Reply with quote

Advertisement

profaned
Guest

certificate

Is it possible now?
Once i give a path it says something about protocol not being webdav and ftpSecure is not set

But it needs to be SFTP with a client certificate

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
29,266
Location:
Prague, Czechia

Re: certificate

profaned wrote:

Is it possible now?
Once i give a path it says something about protocol not being webdav and ftpSecure is not set

But it needs to be SFTP with a client certificate
The SFTP (SSH) protocol does not use client certificates, it uses private keys.
So use the SessionOptions.SshHostKeyFingerprint:
https://winscp.net/eng/docs/library_sessionoptions#sshhostkeyfingerprint

Reply with quote

Advertisement

You can post new topics in this forum