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

[iaik-jce] Problem with running S/MIME example program



Hello,

I'm doing some tests with the IAIK JCE (full version) and IAIK S/MIME for
Java. I'm trying to run the example program (SMimeSend.java) and the plain
text test works fine, but when I try and send myself a signed message
(explicitly signed) I run into this error:

sending explicitly signed message...
javax.mail.SendFailedException: Sending failed;
  nested exception is:
        javax.mail.MessagingException: IOException while sending message;
  nested exception is:
        javax.activation.UnsupportedDataTypeException: no object DCH for
MIME type application/x-pkcs7-signature; name=smime.p7s
        at javax.mail.Transport.send0(Transport.java:219)
        at javax.mail.Transport.send(Transport.java:81)
        at demo.smime.SMimeSend.start(SMimeSend.java:166)
        at demo.smime.SMimeSend.main(SMimeSend.java:500)
javax.mail.MessagingException: IOException while sending message;
  nested exception is:
        javax.activation.UnsupportedDataTypeException: no object DCH for
MIME type application/x-pkcs7-signature; name=smime.p7s
        at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:353)
        at javax.mail.Transport.send0(Transport.java:164)
        at javax.mail.Transport.send(Transport.java:81)
        at demo.smime.SMimeSend.start(SMimeSend.java:166)
        at demo.smime.SMimeSend.main(SMimeSend.java:500)

I get a similar error for sending an implicitly signed message, but the mime
type is application/x-pkcs7-mime.


I'm using the 'mailcap' file that came with the S/MIME library:
# Default mailcap file for the JavaMail System
#
# for our content-handlers
#
text/plain;;
x-java-content-handler=com.sun.mail.handlers.text_plain
multipart/*;;
x-java-content-handler=com.sun.mail.handlers.multipart_mixed
message/*;;
x-java-content-handler=com.sun.mail.handlers.message_rfc822
#
# IAIK 'mailcap' file
#
multipart/signed;;
x-java-content-handler=iaik.security.smime.signed_content
application/x-pkcs7-signature;;
x-java-content-handler=iaik.security.smime.signed_content
application/x-pkcs7-mime;;
x-java-content-handler=iaik.security.smime.encrypted_content
application/x-pkcs10;;
x-java-content-handler=iaik.security.smime.pkcs10_content
application/pkcs7-signature;;
x-java-content-handler=iaik.security.smime.signed_content
application/pkcs7-mime;;
x-java-content-handler=iaik.security.smime.encrypted_content
application/pkcs10;;
x-java-content-handler=iaik.security.smime.pkcs10_content

and it is installed in my JDK lib directory per the documentation.   Yet at
run-time, the Java activation framework can't seem to map the handler.   Any
ideas?

Rob

--
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