java.security.SignatureException: Signature encoding error

Coderanch | Juan Ochoa | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    XMLSignature with SignatureMethod RSA_SHA256

    Coderanch | 3 years ago | Juan Ochoa
    java.security.SignatureException: Signature encoding error

    Root Cause Analysis

    1. java.io.IOException

      SEQUENCE length error

      at sun.security.rsa.RSASignature.decodeSignature()
    2. Java RT
      DOMXMLSignature.validate
      1. sun.security.rsa.RSASignature.decodeSignature(RSASignature.java:235)
      2. sun.security.rsa.RSASignature.engineVerify(RSASignature.java:197)
      3. java.security.Signature$Delegate.engineVerify(Signature.java:1172)
      4. java.security.Signature.verify(Signature.java:623)
      5. org.jcp.xml.dsig.internal.dom.DOMSignatureMethod.verify(DOMSignatureMethod.java:248)
      6. org.jcp.xml.dsig.internal.dom.DOMXMLSignature$DOMSignatureValue.validate(DOMXMLSignature.java:544)
      7. org.jcp.xml.dsig.internal.dom.DOMXMLSignature.validate(DOMXMLSignature.java:253)
      7 frames
    3. com.vialGroup.applet
      TestConSun.main
      1. com.vialGroup.applet.test.senae.TestConSun.main(TestConSun.java:187)
      1 frame