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

AW: [iaik-ssl] SMIME Problem with Outlook Express



Hello,

what kind of error did you get with Outlook Express?

Regards,
Dieter Bratko

-----Ursprüngliche Nachricht-----
Von: iaik-ssl-owner@iaik.tu-graz.ac.at
[mailto:iaik-ssl-owner@iaik.tu-graz.ac.at]Im Auftrag von Gabriel Lopez
Gesendet: Mittwoch, 11. April 2001 09:28
An: iaik-jce@iaik.at; iaik-ssl@iaik.at
Betreff: [iaik-ssl] SMIME Problem with Outlook Express




    Hi all.

    I have a servlet that send a signed mail with:
        IAIK-SMIME-2.6ev
        IAIK-JCE-2.6.1
        JavaMail-1.0.1

    When send a signed mail it is read successfuly in Netscape Messenger
4.72 and  Microsoft Outlook 2000, but in Microsoft Outlook Express it
doesn't work. ˇˇˇ

    The code is:

        Properties props = new Properties();
        props.put("mail.smtp.host", host);
        Session session = Session.getDefaultInstance(props, null);
        MimeMessage msg = new MimeMessage(session);
        DataHandler multipart = null;
          try {
              String head = new String("head");
              String message = new String("message");
              MimeBodyPart mbp1 = new SMimeBodyPart();
              mbp1.setText(message);
              Multipart mp = new SMimeMultipart();
              mp.addBodyPart(mbp1);
              multipart = new DataHandler(mp, mp.getContentType());

               InternetAddress from = new InternetAddress(emailfrom);
               msg.setFrom(from);
               msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(emailto, false));
               msg.setSentDate(new Date());
         } catch (Exception e) {
                .....
         };
         SignedContent sc = new
SignedContent(false,SignedContent.SIGNED_DATA);
        sc.setDataHandler(multipart);

        X509Certificate []  chaincert = new X509Certificate[2];
        chaincert[0] = cert;
        chaincert[1] = certca;

         X509Certificate [] signerCertificates =
Util.arrangeCertificateChain(chaincert,false);
         try {
              sc.setCertificates(signerCertificates);
              sc.setSigner((RSAPrivateKey)privKey,
signerCertificates[0]);
              msg.setContent(sc, sc.getContentType());
             Transport.send(msg);
        } catch (Exception ex) {
            .........
        }

        What's wrong?

        Thanks in advance, Gabi.

--
Gabriel López Millán
Facultad de Informática -Universidad de Murcia
30001 Murcia - Espańa (Spain)
Telf: +34-968-364644 E-mail: gabilm@dif.um.es



--
Mailinglist-archive at
http://jcewww.iaik.at/mailarchive/iaik-ssl/sslthreads.html

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




smime.p7s