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

AW: [iaik-ssl] smime problem (S/MIME Warning)



Title: IAIK S/MIME Mapper Security Warning

IAIK S/MIME Mapper Security Warning

Message S/MIME properties

Encrypted using not encrypted
Digitally signed no
Signature validn/a
Signature trustedn/a

Compliance with policy for email addresses <*@iaik.at>

Encryption OK (None or better required)
Digital Signature NOT OK (digital signature required)



Hello,

Try to move it to JRE/lib directory.

You also may set the mailcap file from your program, e.g.:

String mailcapFileName = ...;
MailcapCommandMap mc = new MailcapCommandMap(mailcapFileName);
CommandMap.setDefaultCommandMap(mc);

For a more detailed description consult the Javadoc of the Activation
Framework.


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: Dienstag, 5. Dezember 2000 19:43
An: iaik-ssl@iaik.at
Betreff: [iaik-ssl] smime problem



Hi all.

I'm sending a smime message with de above code and get the exception:

Notify: error al mandar email: javax.mail.SendFailedException: Sending
failed

File mailcap is in <JDK>/lib

What is grown?? Thanks in advance

   Properties props = new Properties();
   props.put("mail.smtp.host", snmphost);
   Session session = Session.getDefaultInstance(props, null);

  MimeMessage msg = new MimeMessage(session);
  DataHandler multipart = null;
  try {
    MimeBodyPart mbp1 = new SMimeBodyPart();
    mbp1.setText("This is a Test of the IAIK S/MIME
implementation!\n\n");
    Multipart mp = new SMimeMultipart();
    mp.addBodyPart(mbp1);
    multipart = new DataHandler(mp, mp.getContentType());

   InternetAddress from = new InternetAddress("myaddres@um.es");
   msg.setFrom(from);
   msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse("myaddres@um.es",false));
  msg.setSentDate(new Date());
 } catch (Exception e) {
     System.err.println("Notify : Error al añadir direccion" + e);
 };
    SignedContent sc = new SignedContent(false);

 try {
   if (accept) {
       msg.setSubject("Confirmation");
  } else msg.setSubject("Denied");
 } catch (Exception e) {
     System.err.println("Notify : Error al añadir subject");
     e.printStackTrace();
 };

 sc.setDataHandler(multipart);
    //sc.setText(message);
    X509Certificate []  signerCertificates = new X509Certificate[2];
    signerCertificates[0] = mycert;
    signerCertificates[0] = CAcert;
    sc.setCertificates(signerCertificates);

    try {
      sc.setSigner((RSAPrivateKey)privKey, mycert);
      msg.setContent(sc, sc.getContentType());
      Transport.send(msg);
    } catch (Exception ex) {
  System.err.println("Notify: error al mandar email: " + ex);
    }



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



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