[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] S/Mime problems


For my current project I'm trying to use the IAIK S/Mime tools to
accomplish the following structure:

application/pkcs7-mime; ...; name=mymail.p7m

(This is an opaque (or explicit) signed mail, signed by signature 0,
which after decryption gives:)

     text/xml: An xml document
     multipart/signed: Signed PDF 1
       application/pdf: het PDF doc
       application/pkcs7-signature: Signature 2
     multipart/signed: Signed PDF 2
       application/pdf: het 2e PDF doc
       application/pkcs7-signature: Signature 2
     text/xml: A second xml document
     multipart/signed: SignedPDF 3
       application/pdf: het PDF doc
       application/pkcs7-signature: Signature 1

I do this by creating a SMimeMultipart objects for each signed object,
and use a SignedContent to sign it.

When signing the upper SMimeMultpart, which contains the
multipart/mixed, the result only contains the certificate, the
multipart/mixed element is not present.

When trying to sign the upper part with implicit signing, I get an

javax.mail.SendFailedException: Sending failed;
  nested exception is: 
        javax.mail.MessagingException: IOException while sending message;
  nested exception is: 
        java.io.IOException: javax.mail.MessagingException: Please use SMimeMultipart instead of MimeMultipart!
        at javax.mail.Transport.send0(Transport.java:218)
        at javax.mail.Transport.send(Transport.java:80)

But nowhere in my application I create a MimeMultipart instead of an
SMimeMultipart. My guess is that the multipart/signed that is created
automatically (???) is a normal MimeMultipart.

I know our use of S/Mime is a little bit out of the ordinary, but it
still falls within the limitation of the S/Mime standard.

Does anyone have a clue what is going wrong?

Groetjes / regards,
Wilco Boumans

Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce