Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
7.2k views
in Java FTP by (1.3k points)
I read the documentation of StandardValidator. The maximum length is defined by 2, which I personally think, is too small.
Nowadays end certificates do not directly issued by a root CA, instead, the certificates are issued by an intermediate certificate, which is issued by the root to handle if the intermediate certificate is compromised. In that way, the certificates chain is more than 2.

Is there any way we can do using the StandardValidator and set the number of certificate in the chain higher without having to implement Validators on our own?

com.enterprisedt.net.ftp.ssl.SSLFTPException: The server's certificate chain is too long
at com.enterprisedt.net.ftp.ssl.SSLFTPStandardValidator.validateServerCertificate(Unknown Source)
at com.enterprisedt.net.ftp.ssl.SSLFTPClient$2.acceptPeerCertificate(Unknown Source)
at com.enterprisedt.net.puretls.n.B(Unknown Source)
at com.enterprisedt.net.puretls.Z.B(Unknown Source)
at com.enterprisedt.net.puretls.n.E(Unknown Source)
at com.enterprisedt.net.puretls.i.G(Unknown Source)
at com.enterprisedt.net.puretls.SSLSocket.internalSocket(Unknown Source)
at com.enterprisedt.net.puretls.SSLSocket.<init>(Unknown Source)
at com.enterprisedt.net.ftp.ssl.SSLFTPClient.connect(Unknown Source)

2 Answers

0 votes
by (162k points)
Yes, just set SSLFTPStandardValidator.MAX_CERTIFICATE_CHAIN_LENGTH to another value. It's not final so it can be changed.
0 votes
by (1.3k points)
You are totally right. I saw that the field is in capital and automatically think that it is a final static one.

Categories

...