org.bouncycastle.cms.CMSStreamException: key inappropriate for signature. at org.bouncycastle.cms.CMSSignedDataStreamGenerator$CmsSignedDataOutputStream. close(Unknown Source) at org.bouncycastle.mail.smime.SMIMESignedGenerator$ContentSigner.write(Unknown Source)

nabble.com | 7 months 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

    Bouncy Castle - Dev - PrivateKey and signing mail

    nabble.com | 7 months ago
    org.bouncycastle.cms.CMSStreamException: key inappropriate for signature. at org.bouncycastle.cms.CMSSignedDataStreamGenerator$CmsSignedDataOutputStream. close(Unknown Source) at org.bouncycastle.mail.smime.SMIMESignedGenerator$ContentSigner.write(Unknown Source)

    Root Cause Analysis

    1. org.bouncycastle.cms.CMSStreamException

      key inappropriate for signature. at org.bouncycastle.cms.CMSSignedDataStreamGenerator$CmsSignedDataOutputStream. close(Unknown Source) at org.bouncycastle.mail.smime.SMIMESignedGenerator$ContentSigner.write(Unknown Source)

      at org.bouncycastle.mail.smime.handlers.PKCS7ContentHandler.writeTo()
    2. BouncyCastle
      PKCS7ContentHandler.writeTo
      1. org.bouncycastle.mail.smime.handlers.PKCS7ContentHandler.writeTo(UnknownSource)
      1 frame
    3. Java RT
      DataHandler.writeTo
      1. javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:869)
      2. javax.activation.DataHandler.writeTo(DataHandler.java:302)
      2 frames
    4. JavaMail API
      MimeBodyPart.writeTo
      1. javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1383)
      2. javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:852)
      2 frames