0 Replies Latest reply: Sep 11, 2012 9:34 AM by 961393 RSS

    Error "java.security.UnrecoverableKeyException: Get Key failed: Given fina"

    961393
      Hi.

      Could someone help me with this:

      I have a certificate in .pfx format, then i convert this .pfx file into .p12 file format for using in my code. Then i wrote crypto.properties file:

      org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
      org.apache.ws.security.crypto.merlin.keystore.type=pkcs12
      org.apache.ws.security.crypto.merlin.keystore.password=Pass1
      org.apache.ws.security.crypto.merlin.keystore.alias=meou
      org.apache.ws.security.crypto.merlin.alias.password=Pass1
      org.apache.ws.security.crypto.merlin.file=Meou.p12

      When i try sign data with those certificate, i receive errors:

      org.apache.ws.security.WSSecurityException: Error during Signature: ; nested exception is:
           org.apache.ws.security.WSSecurityException: Signature creation failed; nested exception is:
           java.security.UnrecoverableKeyException: Get Key failed: Given final block not properly padded

      Tell me please, what sort of this problem and how to solve this problem?

      I would be grateful for any answer.