0

I have a strange problem (it's 100% server configuration problem,) for example I want to download something from Dropbox:

Resolving dl.dropboxusercontent.com... 23.23.160.146, 50.17.227.107, 54.221.248.69, ... Connecting to dl.dropboxusercontent.com|23.23.160.146|:443... connected. ERROR: cannot verify dl.dropboxusercontent.com’s certificate, issued by “/C=US/ST=CA/O=SonicWALL Inc./CN=SonicWALL Firewall DPI-SSL”: Self-signed certificate encountered. To connect to dl.dropboxusercontent.com insecurely, use ‘--no-check-certificate’.

Yes, I know that I can use --non-check-certificate but when I want to use SSL connection in Java app I have something like this:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

This app works great in other servers or in local machines, any ideas what is wrong here?

1 Answer 1

0

It looks like there is a Sonicwall firewall in between your CentOS machine and dropbox. If that is indeed the case, and you trust that firewall, you could choose to add the Sonicwall's CA certificate to your Java's truststore using keytool.

keytool -import -trustcacerts -file /path/to/ca/ca.pem -alias CA_ALIAS -keystore $JAVA_HOME/jre/lib/security/cacerts

Blatantly copy-pasted from: http://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .