mock-server / mockserver

MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
http://mock-server.com
Apache License 2.0
4.57k stars 1.07k forks source link

Using https with own keystore and truststore #587

Closed UweNachname closed 5 years ago

UweNachname commented 5 years ago

Hi everybody,

I use MockServer to simulate some RESTful-Services. I start the MockServer in the command line java -jar ./mockserver-netty-5.5.1-jar-with-dependencies.jar -serverPort 9010

Then I configure it in Java with: ... MockServerClient mockServer = new MockServerClient("localhost", 9010); mockServer.when(request().withPath(...some.kind.of.path...)).respond(response().withStatusCode(Integer.valueOf(200))); ...

While requesting and using the mock it works fine. The whole thing is working via http, which runs perfect.

How can I managed it to use https with my own keystore and (because of client authentification is needed) own truststore?

I hope someone can help.

Thanks in advance and best regards,

Uwe

UweNachname commented 5 years ago

Sorry, I switched to WireMock version 2.21.0. Runs perfect.