cancel
Showing results for 
Search instead for 
Did you mean: 

SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

New Contributor

SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

I have tried multiple things, I have a CA issued certificate and private key. And I have generated a JKS file using following command:

keytool -importkeystore -srckeystore somename.p12 -srcstoretype PKCS12 -destkeystore somename.jks -deststoretype JKS

Everytime I add keystore/certificate to my SoapUI, I get error "KeystoreException Failed to extract any certificate or private keys - maybe bad password

I even tried the same set of steps with SelfSigned Cert as well as CA issued Cert. Same result. password is correct, what am I missing here?

8 REPLIES 8
Super Contributor

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

Quickest way would be log a ticket with support

https://support.smartbear.com/

I have not come accross thi

New Contributor

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

Thanjs Sanj,

 

When I use Keystore explorer tool it show my JSK is fine and valid. But Soap UI shows that msg. What am I missing?

New Contributor

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

It wont let me create a Service ticket

Community Hero

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

Try posting the contents of the readyapi.log. That might help us provide some insight.




---

Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
New Contributor

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

attaching ready-api.log and readyapierror.log. it is the same message as i have in my original post.

 

 

2017-08-25 14:07:10,161 ERROR [errorlog] org.apache.ws.security.WSSecurityException: Signature creation failed
org.apache.ws.security.WSSecurityException: Signature creation failed
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:561)
at com.eviware.soapui.impl.wsdl.support.wss.entries.SignatureEntry$WSSecSignatureRA.build(SignatureEntry.java:405)
at com.eviware.soapui.impl.wsdl.support.wss.entries.SignatureEntry.process(SignatureEntry.java:218)
at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:196)
at com.eviware.soapui.impl.wsdl.actions.request.ApplyOutgoingWSSToRequestAction.actionPerformed(ApplyOutgoingWSSToRequestAction.java:54)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.apache.ws.security.WSSecurityException: General security error (The private key for the supplied alias does not exist in the keystore)
at org.apache.ws.security.components.crypto.Merlin.getPrivateKey(Merlin.java:725)
at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:504)
... 42 more
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(Unknown Source)
at sun.security.provider.JavaKeyStore.engineGetKey(Unknown Source)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(Unknown Source)
at sun.security.provider.KeyStoreDelegator.engineGetKey(Unknown Source)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(Unknown Source)
at java.security.KeyStore.getKey(Unknown Source)
at org.apache.ws.security.components.crypto.Merlin.getPrivateKey(Merlin.java:711)
... 43 more

ZH
New Contributor

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

i am facing same issue not sure what is the issue; it was working fine before but once I made some updates in the project this error has started appearing.

19:42:36,720 ERROR [SoapUI] An error occurred [Signature creation failed], see error log for details
org.apache.ws.security.WSSecurityException: Signature creation failed
        at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:561)
        at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:481)
        at org.apache.ws.security.message.WSSecSignature.build(WSSecSignature.java:386)
        at com.eviware.soapui.impl.wsdl.support.wss.entries.SignatureEntry.process(SignatureEntry.java:239)
        at com.eviware.soapui.impl.wsdl.support.wss.OutgoingWss.processOutgoing(OutgoingWss.java:174)
        at com.eviware.soapui.impl.wsdl.mock.WsdlMockResponse.executeSpecifics(WsdlMockResponse.java:345)
        at com.eviware.soapui.impl.support.AbstractMockResponse.execute(AbstractMockResponse.java:267)
        at com.eviware.soapui.impl.wsdl.mock.WsdlMockOperation.dispatchRequest(WsdlMockOperation.java:209)
        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(WsdlMockDispatcher.java:219)
        at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(WsdlMockDispatcher.java:114)
        at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:144)
        at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:604)
        at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:713)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.ws.security.WSSecurityException: General security error (The private key for the supplied alias does not exist in the keystore)
        at org.apache.ws.security.components.crypto.Merlin.getPrivateKey(Merlin.java:725)
        at org.apache.ws.security.message.WSSecSignature.computeSignature(WSSecSignature.java:504)
        ... 24 more
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
        at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
        at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146)
        at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
        at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96)
        at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70)
        at java.security.KeyStore.getKey(KeyStore.java:1023)
        at org.apache.ws.security.components.crypto.Merlin.getPrivateKey(Merlin.java:711)
        ... 25 more
in onMockResult for [Create Order Response] for result 1556544410
Got mockrequest to [Create Order Response]

Occasional Visitor

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

We are now facing this issue. Did you get to the bottom of this issue?

 

Thank you in advance. 

Moderator

Re: SOAPUI KeystoreException Failed to extract any certificate or private keys - maybe bad password

Maybe the following articles could help:

https://stackoverflow.com/questions/14606837/cannot-recover-key

https://stackoverflow.com/questions/29997688/android-studio-cannot-recover-key/39766457



 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!