I have to use FTPS for file transfer. Hence, my requirement is to perform ftp server certificate validation. Currently, we have generated user signed certificate of ftp sever machine using openSSL, The resulting file is cacert.pem.
Its format is:
-----BEGIN CERTIFICATE-----
----------------------------------
-----END CERTIFICATE-----
I am using SecureFileTransferClient and server validation
client.loadSSLServerValidation(rootCert);
I have passed the ftp server machine certificate to above method.
Its throwing me exception as below
Server certificate could not be validated. (use SSLFTPCertificateException.printCertificates to view certificates.).
- Will I be able to use user sign certificate?
- If yes, what is format of certificate?
- Do I need to install that certificate on ftp server machine?