0

In my app "A" I need to write a method that requests to the other service "B" through https protocol at a certain stand

Right now I have a following exception

javax.net.ssl.SSLHandshakeException: PKIX path building failed: 
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path 
to requested target
at reactor.core.Exceptions.propagate(Exceptions.java:393)
at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:97)
at reactor.core.publisher.Mono.block(Mono.java:1680)
at ru.raiffeisen.bgt.initiative.service.impl.HomeServiceImpl.graphqlRequest(HomeServiceImpl.kt:306)
at ...
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid 
certification path to requested target

I made some research and everywhere is said that I need to download a certificate and put it on my JVM. But if I do so, will it not work only on my local machine ?

How to resolve this issue ??

Nursultan
  • 69
  • 1
  • 7
  • 2
    Get the server to use a CA-signed certificate and save yourself bother forever. – user207421 Mar 15 '21 at 05:40
  • @user207421 Service B already has CA certificate. When I try to access through web browser, everything works. But it does not work through WebClient – Nursultan Mar 15 '21 at 07:04

0 Answers0