How to make wiremock accept any certificate

428 views
Skip to first unread message

Rakesh Kadulkar

unread,
Jun 23, 2015, 11:20:01 AM6/23/15
to wiremo...@googlegroups.com
Hi,

The wiremock gives me below exception :

java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Because I believe the upstream I am calling doesn't have a valid certificate.

How can I tell WireMock to accept any certificate from upstream?

I run wiremock in a standalone mode like below :

java -jar ./wiremock-1.54-standalone.jar --port 8080 --https-port 8443  --verbose --record-mappings --match-headers="Cookie"

However when I run wiremock like below it does works fine.

java -Djavax.net.ssl.trustStore=myCustomeKeyStore -jar ./wiremock-1.54-standalone.jar --port 8080 --https-port 8443  --verbose --record-mappings --match-headers="Cookie"

where as myCustomeKeyStore is a key store containing the upstream certificates.

Thank You,
Rakesh

Rakesh Kadulkar

unread,
Jun 24, 2015, 7:53:51 AM6/24/15
to wiremo...@googlegroups.com
Does anyone has answer to this?

D

unread,
May 1, 2016, 6:36:40 AM5/1/16
to wiremock-user
Hi,

I am facing the same problem. Did anyone find any solution to this?

Tom Akehurst

unread,
May 1, 2016, 6:54:11 AM5/1/16
to wiremock-user
Can you post the full details for this i.e. full stack trace, setup and calling code, log messages?
Reply all
Reply to author
Forward
0 new messages