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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via ejbca by selbitschka
, 1 year ago
exception unwrapping key: bad padding: doFinal() failed
via Stack Overflow by CSSC
, 2 years ago
exception unwrapping key: bad padding: Decryption error
via nabble.com by Unknown author, 1 year ago
exception unwrapping key: key invalid: init() failed
via Stack Overflow by AJeneral
, 2 years ago
exception unwrapping key: bad padding: doFinal() failed
via Stack Overflow by Dan
, 8 months ago
exception unwrapping key: cannot initialise algorithm parameters: Operation not supported
org.bouncycastle.cms.CMSException: exception unwrapping key: bad padding: doFinal() failed
at org.bouncycastle.cms.jcajce.JceKeyTransRecipient.extractSecretKey(Unknown Source)
at org.bouncycastle.cms.KeyTransRecipientInformation.getRecipientOperator(Unknown Source)
at org.bouncycastle.cms.RecipientInformation.getContentStream(Unknown Source)
at org.ejbca.core.protocol.scep.ScepRequestMessage.decrypt(ScepRequestMessage.java:388)
at org.ejbca.core.protocol.scep.ScepRequestMessage.getPassword(ScepRequestMessage.java:498)
at org.ejbca.ui.web.protocol.ScepPkiOpHelper.addOrEditUser(ScepPkiOpHelper.java:207)
at org.ejbca.ui.web.protocol.ScepPkiOpHelper.scepCertRequest(ScepPkiOpHelper.java:135)
at org.ejbca.ui.web.protocol.ScepServlet.service(ScepServlet.java:245)
at org.ejbca.ui.web.protocol.ScepServlet.doPost(ScepServlet.java:156)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.