PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchorsCAUSE
does not recognize the digital certificate issuer or path validatioan failedMy CODE
PKIXParameters params = new PKIXParameters(Collections.singleton(anchor));SOLVED
params.setRevocationEnabled(true);
- Change the digital certificate issuer/certificate authority to JKS format
- Change the source code to
KeyStore keystore = KeyStore.getInstance("JKS");try (InputStream is = Files.newInputStream(Paths.get("root.jks"))) {
keystore.load(is, "".toCharArray());
}
PKIXParameters params = new PKIXParameters(keystore);
params.setRevocationEnabled(true);
0 comments:
Post a Comment