org.bouncycastle.cms.CMSException: exception unwrapping key: bad padding: doFinal() failed

ejbca | selbitschka | 2 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

    SCEP RA Mode decryption error - wrong CA used for decryption

    ejbca | 2 years ago | selbitschka
    org.bouncycastle.cms.CMSException: exception unwrapping key: bad padding: doFinal() failed
  2. 0

    Bouncy Castle - Dev - Issue verifying CMS content

    nabble.com | 9 months ago
    org.bouncycastle.cms.CMSException: exception unwrapping key: cannot create cipher: No such algorithm: 1.2.840.113549.1.1.1

    Root Cause Analysis

    1. org.bouncycastle.cms.CMSException

      exception unwrapping key: bad padding: doFinal() failed

      at org.bouncycastle.cms.jcajce.JceKeyTransRecipient.extractSecretKey()
    2. Bouncy Castle PKIX, CMS, EAC, TSP, PKCS, OCSP, CMP, and CRMF APIs
      JceKeyTransEnvelopedRecipient.getRecipientOperator
      1. org.bouncycastle.cms.jcajce.JceKeyTransRecipient.extractSecretKey(Unknown Source)[bcpkix-jdk15on-149.jar:1.49.0]
      2. org.bouncycastle.cms.jcajce.JceKeyTransEnvelopedRecipient.getRecipientOperator(Unknown Source)[bcpkix-jdk15on-149.jar:1.49.0]
      2 frames
    3. BouncyCastle
      RecipientInformation.getContent
      1. org.bouncycastle.cms.KeyTransRecipientInformation.getRecipientOperator(Unknown Source)[bcpkix-jdk15on-149.jar:1.49.0]
      2. org.bouncycastle.cms.RecipientInformation.getContentStream(Unknown Source)[bcpkix-jdk15on-149.jar:1.49.0]
      3. org.bouncycastle.cms.RecipientInformation.getContent(Unknown Source)[bcpkix-jdk15on-149.jar:1.49.0]
      3 frames
    4. org.ejbca.core
      ScepRequestMessage.getPassword
      1. org.ejbca.core.protocol.scep.ScepRequestMessage.decrypt(ScepRequestMessage.java:388)[ejbca-util.jar:EJBCA 6.2.0 (r19221)]
      2. org.ejbca.core.protocol.scep.ScepRequestMessage.getPassword(ScepRequestMessage.java:498)[ejbca-util.jar:EJBCA 6.2.0 (r19221)]
      2 frames
    5. org.ejbca.ui
      ScepServlet.doPost
      1. org.ejbca.ui.web.protocol.ScepPkiOpHelper.addOrEditUser(ScepPkiOpHelper.java:207)[classes:]
      2. org.ejbca.ui.web.protocol.ScepPkiOpHelper.scepCertRequest(ScepPkiOpHelper.java:135)[classes:]
      3. org.ejbca.ui.web.protocol.ScepServlet.service(ScepServlet.java:245)[classes:]
      4. org.ejbca.ui.web.protocol.ScepServlet.doPost(ScepServlet.java:156)[classes:]
      4 frames