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 | 4 months ago
  1. 0

    Bouncy Castle - Dev - PrivateKey and signing mail

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