Configure a Java HTTP Client to Accept Self-Signed Certificates: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:
=Overview=
=Overview=


If the HTTPS server a Java client is trying to connect to is configured with self-signed SSL certificates, the Java client will fail with:
If a Java client is attempting to connect to a HTTPS server configured with self-signed SSL certificates, the Java client will fail with:


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

Revision as of 10:19, 9 December 2017

Internal

Overview

If a Java client is attempting to connect to a HTTPS server configured with self-signed SSL certificates, the Java client will fail with:

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