I need to upload a file to a secure FTP server that has a self signed SSL certificate.
Where can I find the certificate file?
How do I add it to the FtpWebRequest
?
I know where the file is located on the server. It is a .PEM
File. Does the server send the certificate to the client or do I need to place the certificate in the client application.
Dim request As FtpWebRequest = WebRequest.Create(FTP_Address)
request.Credentials = New NetworkCredential(FTP_Username, FTP_Password)
Dim cert As X509Certificate2 = ???
request.ClientCertificates.Add(cert)
request.EnableSsl = True
request.Method = WebRequestMethods.Ftp.UploadFile