javax.net.ssl.SSLHandshakeException when using specmatic proxy and https host #1104
Unanswered
cduartelulo
asked this question in
Ask For Help
Replies: 1 comment
-
Hey @cduartelulo, can you let us know the error that you got after providing the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
I'm new using specmatic, I'm interested in Specmatic proxy to generate contracts, I have a private API secured by Mutual TLS, where is necessary to use a p12 certificate. The Specmatic proxy is started using the following command:
specmatic proxy --debug --target https://path/to/api/stage --port 9001 ./contracts
The proxy server starts correctly, however, when the proxy receives traffic an error is raised:
Received fatal alert: certificate_required javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_required at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131) at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117) at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:365) at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:293) at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:204) at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:172) at java.base/sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:736) at java.base/sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:691) at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:506) at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:482) at java.base/javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:679) at org.apache.http.nio.reactor.ssl.SSLIOSession.doUnwrap(SSLIOSession.java:278) at org.apache.http.nio.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:507) at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:550) at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:120) at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337) at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315) at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276) at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104) at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591) at java.base/java.lang.Thread.run(Thread.java:840)
I'm stucked, I tried the following commands:
java -jar specmatic.jar proxy --debug --httpsKeyAlias "alias" --httpsKeyStore="/path/to/certificate/certificate.pfx" --httpsKeyStorePassword="password" --target=https://path/to/api/stage --port=9001 ./contracts
java -Djavax.net.ssl.keyStore="/path/to/certificate/certificate.p12" -Djavax.net.ssl.keyStorePassword="password" -jar specmatic.jar proxy --debug --target https://path/to/api/stage --port 9001 ./contracts
None of these work.
I really appreciate your help, we are very interested in using specmatic proxy, stubbing and other features.
Beta Was this translation helpful? Give feedback.
All reactions