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

Re: [iaik-jce] [iaik-ssl] help me with S/MIME,please...



Yes, I have:

MimeBodyPart intestazione=(MimeBodyPart)mp.getBodyPart(0);
SignedContent scIntestazione = new SignedContent(true);
DataHandler dataHandlerIntestazione = new
                                DataHandler(intestazione,
intestazione.getContentType());
scIntestazione.setDataHandler(dataHandlerIntestazione);
scIntestazione.setCertificates(certificates);

scIntestazione.setSigner((java.security.interfaces.RSAPrivateKey)
                                            signerPrivateKey,
signerCertificate);
MimeBodyPart intestazioneFirmata = new MimeBodyPart();

String
content=scIntestazione.getContentType()+";smime-type=\"signed-data\"";

intestazioneFirmata.setContent(scIntestazione,scIntestazione.getContentType());

// The Content Type of the MimeeBodyPart doesn't contain the smime-type, so
we have // add it using the string content as content Type. This  trick
works for a MimeMessage, // but it doesn't work for a MimeBodyPart...

Thank you , I hope you to help me....
Daniela

Zahid Ahmed wrote:

> Do you have some test code for S/MIME sender
> and S/MIME receiver?
>
> thanks.
> > -----Original Message-----
> > From: Dani [mailto:fontana@cefriel.it]
> > Sent: Thursday, June 03, 1999 10:44 AM
> > To: iaik-ssl@iaik.tu-graz.ac.at
> > Subject: [iaik-ssl] help me with S/MIME,please...
> >
> >
> > Hi,
> > I have a matter with S/MIME!!!
> > I need to send signed messages. I can send a signed message but when I
> > try to verify the signature, the program search for the "smime-type".
> > During
> > the sending of the message, the procedure that is suggested in the
> > demo-program doesn't set this field. There isn't a method to set this
> > field!!
> > How can we do??? Please, help me!!!I hope that you can understand my
> > terrible
> > description....sorry for my english...
> > Thank you in advance!!
> >
> > Daniela
> >
> >
> >
> >
> > --
> > Mailinglist-archive at
> > http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-ssl/maillist
> .html
>
> To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the
> folowing content: UNSUBSCRIBE iaik-ssl



--
Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-jce/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-jce