HTTPS certificate validation fails when using a trustStore

后端 未结 2 1081
时光说笑
时光说笑 2021-02-03 14:23

I\'m getting the following error

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException

2条回答
  •  闹比i
    闹比i (楼主)
    2021-02-03 14:54

    The application doesn't find the right truststore. You can define it that way: System.setProperty("javax.net.ssl.trustStore", ".\\src\\truststore.jks"); System.setProperty("javax.net.ssl.trustStorePassword", "psw123");

提交回复
热议问题