0

I just set up WSO2 2.6 in windows 10 and publish simple .net core web api without any error tracing on server log,but when i invoke api with OAuth authentication from WSO2 Store, its return SSL Exception below

ERROR - SourceHandler I/O error: Received fatal alert: certificate_unknown
javax.net.ssl.SSLException: Received fatal alert: certificate_unknown
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1647)
        at sun.security.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1615)
        at sun.security.ssl.SSLEngineImpl.recvAlert(SSLEngineImpl.java:1781)
        at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:1070)
        at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:896)
        at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:766)
        at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
        at org.apache.http.nio.reactor.ssl.SSLIOSession.doUnwrap(SSLIOSession.java:245)
        at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:280)
        at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:410)
        at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:119)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:159)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:338)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
        at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586)
        at java.lang.Thread.run(Thread.java:748)
2
  • So, what is the question? The message certificate_unknown should tell you to look at your certificate-tree. Oct 3, 2019 at 18:29
  • I just set up WSO2 2.6 in windows 10 and publish simple .net core web api without any error tracing on server log,but when i invoke api with OAuth authentication from WSO2 Store, its return SSL Exception below Oct 4, 2019 at 8:57

1 Answer 1

0

Based on your second reply, this error is an SSL failure when the API gateway tries to communicate with the back end. It seems to me that you are using a HTTPS back end for the particular API. If so, then the public certificate of your back end needs to be included in the client-truststore.jks (/repository/resources/security) in WSO2 API Manager.

You can use the following command to get the public cert of the endpoint or can be exported from the browser as well.

openssl s_client -showcerts -connect www.example.com:443 </dev/null

Use the following command to import the certificate to the keystore

keytool -importcert -file certificate.cer -keystore keystore.jks -alias "Alias"
1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .