https://linen.dev logo
#wiremock-java
Title
# wiremock-java
i

ines rattab

01/19/2023, 7:51 AM
Hello, I'm using wiremock to test mutual ssl connection with an external API. But i'm getting this error
client_cacerts.jks is not a valid keystore
, although it is valid , here is the code
Copy code
WireMockServer wireMock = new WireMockServer(wireMockConfig()
      //.port(8080)
      .httpsPort(8443)
      .needClientAuth(true)
      .keystoreType("jks")
      .keystorePath("client_keystore.jks") // Either a path to a file or a resource on the classpath
      .keystorePassword("secret")
      .keyManagerPassword("secret")
      .trustStorePath("client_cacerts.jks")// The password used to access the keystore. Defaults to "password" if omitted
      .trustStorePassword("secret")
);
@Test
void test() {
   wireMock.start();
   wireMock.stubFor(
         WireMock.get("/hello")
               .willReturn(WireMock.ok("world"))
   );
Any thoughts what might be causing this error ?
2 Views