Setting client certificate

Top  Previous  Next

In a secure FTP connection you may be required by the server to provide a client certificate providing additional authentication that you are who you say you are.  You may supply a client certificate using the Ftp.SetClientCertificate method.  The certificate provided must be a valid .cer or PEM file.

 

Example

 

// create new Ftp instance

Ftp client = new Ftp(HOST, USER, PWD, PORT);

 

// set connection type to explicit ssl

client.ConnectionType = Ftp.AUTH_TLS;

 

// set client certificate

client.SetClientCertificate("certificate.cer");

 

// establish connection

client.Connect();