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

AW: [iaik-jce] Signed S/MIME problem in MS Outlook



Hello,

I am not aware about the way Outlook 98 sets the icon, but it might help to
set the smime-type parameter. When sending a signed S/MIME message where the
data is included (IMPLICIT mode) the same MIME type (application/pkcs7-mime)
is used as when sending an enveloped (encrypted) message. The optional
smime-type parameter may be set to signed-data indicating a signed message
already in the MIME header:

Content-Type: application/pkcs7-mime; smime-type=signed-data;

With IAIK-S/MIME you may set the smime-type when creating a SignedContent
object:

SignedContent sc = new SignedContent(SIGN_IMPLICIT,
SignedContent.SIGNED_DATA);

Regards,
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 Bukovský
Gesendet: Montag, 4. September 2000 11:15
An: 'iaik-jce@iaik.at'
Betreff: [iaik-jce] Signed S/MIME problem in MS Outlook


Hello

I use following code to send signed S/MIME emails. All work fine, only MS
Outlook (98) shows incorrect icon for message in inbox. Description of email
is valid ("Signed") but as icon is used "lock" in bottom right corner
instead "certficate" in top left corner. Any ideas...?

Thanks in advance

Ales Bukovsky, BSC Praha

Source code:


X509Certificate cert = loadCert();

System.out.println("Preparing SMTP session...");
Properties props = new Properties();
props.put("mail.smtp.host", HOST_SMTP);
Session session = Session.getDefaultInstance(props, null);

System.out.println("Preparing S/MIME message content...");
MimeBodyPart mbp = new SMimeBodyPart();
mbp.setText(MSG_BODY);
MimeBodyPart attach = new SMimeBodyPart();
attach.setDataHandler(new DataHandler(new FileDataSource(ATTACH_FILE)));
attach.setFileName(ATTACH_NAME);
Multipart mp = new SMimeMultipart();
mp.addBodyPart(mbp);
mp.addBodyPart(attach);

System.out.println("Preparing S/MIME message header...");
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(ADDRESS_FROM));
msg.setRecipients(javax.mail.Message.RecipientType.TO,
InternetAddress.parse(address, false));
msg.setSubject(MSG_SUBJECT);
msg.setSentDate(new java.util.Date());

System.out.println("Signing S/MIME message content...");
SignedContent sc = new SignedContent(SIGN_IMPLICIT);
sc.setDataHandler(new DataHandler(mp, mp.getContentType()));
sc.setCertificates(new X509Certificate[]{sstore.getCertificate()});
sc.setSigner(sstore.getPrivate(SECURE_STORE_PSWD), sstore.getCertificate());
sc.setHeaders(msg);
msg.setContent(sc, sc.getContentType());

System.out.println("Sending S/MIME message content...");
msg.saveChanges();
Transport.send(msg);
System.out.println("Session finished.");
--
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




smime.p7s