Skip to Content
avatar image
Former Member

PI7.5 REST Adapter error with client certificates

HI All,

I am working on a scenario where I am sending data to a cloud application using REST adapter. Since we are using HTTPS I have loaded the client certificate in NWA under the TrustedCAs.

Issue is when running the interface I an getting the error 'Unable to recover the key' . below is the detailed stack trace. Any help is deeply appriciated.

ERROR: NOT A KEY-PAIR Exception occurred: Unable to recover the key: java.security.KeyStoreException: Not a certificate entry at com.sap.engine.services.keystore.impl.KeyStoreEntry.getKey(KeyStoreEntry.java:222) at com.sap.xi.tools.inspector.checks.SignatureCheck.checkEntry(SignatureCheck.java:792) at com.sap.xi.tools.inspector.checks.SignatureCheck.checkPrivateKey(SignatureCheck.java:753) at com.sap.xi.tools.inspector.checks.SSLClientCheck.checkIt(SSLClientCheck.java:147) at com.sap.xi.tools.inspector.checks.SSLClientCheck.checkChannel(SSLClientCheck.java:104) at com.sap.xi.tools.inspector.checks.Check.check(Check.java:68) at com.sap.xi.tools.inspector.output.XIChannelInfo.getHTML(XIChannelInfo.java:96) at com.sap.xi.tools.inspector.output.Output.write(Output.java:36) at com.sap.xi.tools.inspector.output.Output.write(Output.java:31) at com.sap.xi.tools.inspector.output.XIChannelInfo.write(XIChannelInfo.java:45) at com.sap.xi.tools.inspector.XIInspector.stop(XIInspector.java:412) at com.sap.xi.tools.inspector.Scheduler.stop(Scheduler.java:137) at com.sap.xi.tools.inspector.XIInspector.end(XIInspector.java:296) at JEE_jsp_result_1495041536687._jspService(JEE_jsp_result_1495041536687.java:83) at com.sap.engine.services.servlets_jsp.lib.jspruntime.JspBase.service(JspBase.java:102) at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152) at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466) at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441) at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430) at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81) at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60) at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43) at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12) at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78) at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:468) at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:262) at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)

Thanks

Nikhil

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jul 06, 2017 at 01:31 PM

    Hi Nikhil, you could solve the problem, I have the same error.

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 11, 2017 at 11:30 PM

    Hi

    Since this was a standard certificate signed by certifying authorities, we just have to import it in the trusted CA key store.

    in the channel we usee the url with HTTPS. the processing first checks for a valid certificate in the Trusted CA.

    so if the certificate was correct it should pick it up.

    Thanks

    Nikhil

    Add comment
    10|10000 characters needed characters exceeded