0
votes

Hi I have published rest api endpoint url in wso2 2.1.0 version and when I try to test it in API console, I get certificate_unknown error. How to add certificate for this endpoint url. The same published API is working from postman. I am able to see the response content in postman.

HTTPS-Listener I/O dispatcher-1, WRITE: TLSv1.2 Handshake, length = 1277 HTTPS-Listener I/O dispatcher-1, READ: TLSv1.2 Alert, length = 2 HTTPS-Listener I/O dispatcher-1, RECV TLSv1.2 ALERT: fatal, certificate_unknown HTTPS-Listener I/O dispatcher-1, fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: Received fatal alert: certificate_unknown HTTPS-Listener I/O dispatcher-1, fatal: engine already closed. Rethrowing javax.net.ssl.SSLException: Received fatal alert: certificate_unknown [2019-11-04 11:59:17,558] 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)

This url will give 500 error due to logical error in postman. The response content should appear in API console as well. But I get empty content for the response.

Request Headers
{
  "Accept": "application/json"
}
Response Body
no content
Response Code
500
Response Headers
{
  "cache-control": "must-revalidate,no-cache,no-store",
  "content-type": null
}
2
can u attach a screenshot plz?Bee

2 Answers

0
votes

Are you trying to invoke the API resource with Try it out feature in Store UI?

1
votes

Open the WSO2 API url in new tab (for which you are trying to do the testing from swagger console) and accept the certificate, and then try again in WSO2 store.