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

AW: [iaik-jce] S/MIME SignedContent problem


S/MIME anytime cryptographically processes whole Mime entities. The content
type represented by the decrypted data can be obtained from the header
fields (content type, name, fileName,...) of the corresponding Mime Entity.
If you want a proper handling of rtf data you may write and register your
own JAF DataContentHandler.
When implementing method getContent(DataSource ds) you may obtain the right
content type from the supplied DataSource. Please see JAF and JavaMail
documentation for more information.

Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-jce-owner@iaik.tu-graz.ac.at
[mailto:iaik-jce-owner@iaik.tu-graz.ac.at]Im Auftrag von Karri-Tuomas
Gesendet: Freitag, 16. Februar 2001 10:10
An: iaik-jce@iaik.at
Betreff: [iaik-jce] S/MIME SignedContent problem


I have a problem relating to the SignedContent processing. When I
receive a message which MIME parameters are

Content-type: application/pkcs7-mime; name=smime.p7m;
Content-disposition: attachment; filename=smime.p7m
Content-transfer-encoding: base64

and that MIME message contains, e.g., a rich text formatted data. So
how can I retrieve the original MIME type information from the received

I have tried the following template to resolve the content's type, and
the type it returns is java.io.ByteArrayInputStream.

SignedContent sc = ...;
Object content;
try {
   content = sc.getContent();
} catch (Exception e) {...}

if (content instanceof MimeBodyPart) {
} else if (content instanceof Multipart) {
} else if (content instanceof String) {
} else {

Ok, I know that for content types that are unknown to the DataHandler
system, an input stream is returned as the content.

For example, I send that kind of SignedContent message to the Netscape
Messanger 4.76, how can the Netscape resolve the original RTF content
type out from the SignedContent.

Thanks in advance for your help!

Regards Karri
Mailinglist-archive at

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