org.bouncycastle.cms.CMSStreamException: key inappropriate for signature.

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 Oracle Community by jvr Guest, 1 year ago
key inappropriate for signature.
via hivmr.com by Unknown author, 1 year ago
key inappropriate for signature.
org.bouncycastle.cms.CMSStreamException: key inappropriate for signature.
at java.security.SignatureSpi.engineInitSign(SignatureSpi.java:86)
at java.security.Signature$Delegate.engineInitSign(Signature.java:1104)
at java.security.Signature.initSign(Signature.java:498)
at org.bouncycastle.cms.CMSSignedDataStreamGenerator$SignerInf.toSignerInfo(Unknown Source)
at org.bouncycastle.cms.CMSSignedDataStreamGenerator$CmsSignedDataOutputStream.close(Unknown Source)
at org.bouncycastle.mail.smime.SMIMESignedGenerator$ContentSigner.write(Unknown Source)
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:869)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1383)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:852)
at org.bouncycastle.mail.smime.handlers.multipart_signed.outputBodyPart(Unknown Source)
at org.bouncycastle.mail.smime.handlers.multipart_signed.outputBodyPart(Unknown Source)
at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:869)
at javax.activation.DataHandler.writeTo(DataHandler.java:302)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1383)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1743)
at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1719)
at javaemail.SignedMultipartEmailTest.main(SignedMultipartEmailTest.java:537)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago

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