I'm encountering an SSL connection issue when using WireMock to mock an external HTTPS service. The mock server is configured and starts up correctly, but when my application tries to make a request through the mocked endpoint, it fails with an SSL connection error.
The SSL connection could not be established, see inner exception.
What works
The real service works perfectly fine when called directly via Postman
Replacing the external service's URL with a localhost-based mocked endpoint works without any issues
The SSL error only occurs when trying to use WireMock to simulate the external HTTPS service
What I've tried
Verified the external service’s SSL certificate is valid and accessible
Ensured the mock server is running with HTTPS enabled (--https-port)
Tried disabling certificate validation temporarily to debug, but the error persists
Looked into WireMock configuration options for trust store and keystore setup, but the documentation isn't entirely clear
My application is written for .NET Core, and this happens at the time of recording.
What can I try next?