1

I am using fiddler running on the default port (8866) I have trusted the fake certificate and am capturing requests.

I have set the necessary proxy parameters in my spring boot application.

System.setProperty("http.proxyHost", "localhost");
System.setProperty("https.proxyHost", "localhost");
System.setProperty("http.proxyPort", "8866");
System.setProperty("https.proxyPort", "8866");
System.setProperty("java.net.useSystemProxies", "true");

When the request is made, I get the CONNECT captured by fiddler, and then this exception in java.

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

How do I bypass or turn off this validation temporarily to capture the request?

Jim
  • 14,952
  • 15
  • 80
  • 167
  • Java does not make use of the Windows certificate store. Therefore you manually have add the Fiddler root CA certificate to the Java trust store or create a new trust store with the Fiddler root CA cert in it and specify that trust store at start-up. – Robert Nov 23 '20 at 10:20
  • you can post that as the answer @Robert and I will tick it. – Jim Feb 12 '21 at 13:22

0 Answers0