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

[iaik-jce] S/MIME v2.52 demo SMimeSend problem ...

Hello !!

I'm trying to make the demo 'SMimeSend' sample from IAIK S/MIME 2.52.
I've modified the demo file in order to send mail to my LAN mail serveur to myself with this config.
- Certificat & private key exported from Netscape through p12 file format.

The code is it:

PKCS12 p12 = new PKCS12(new FileInputStream("d:\\dev\\security\\dev\\java\\iaik\\maldo.p12"));
System.out.println("Verify maldo.p12: "+p12.verify("test".toCharArray()));

signerPrivateKey = p12.getKeyBag().getPrivateKey();
certificates = CertificateBag.getCertificates(p12.getCertificateBags());
signerCertificate = certificates[1];
recipientCertificate = signerCertificate;

I run the sample and I receive mails ... 12 exactly ...

sending plain message...
sending explicitly signed message...
sending implicitly signed message...
sending encrypted message [RC2/40]...
sending encrypted message [RC2/64]...
sending encrypted message [RC2/128]...
sending encrypted message [DES]...
sending encrypted message [TripleDES]...
sending implicitly signed and encrypted message [RC2/40]...
sending explicitly signed and encrypted message [RC2/40]...
sending certs-only message
sending message with certs-only part
I read my mail with Netscape Communicator 4.61.
Some of the mail could not be read because I'm using a french Navigator (RC2 - CBC 40 bits max)
The problem is that I can't verifiy signed messages, decrypt encrypted messages ...
The CA Certificat wich can verify my certificat is in the Netscape 'Signers' folder.

Is it because the recipient certificat is not in the 'People' folder in the java Security window ???
I'm gonne use the recipient certificat of a friend, but I pretty sure this problem will come again .. .!
Could someone help me please !!! :-)

See you !

tel;fax:01 41 43 84 80
tel;work:01 41 43 84 66
adr:;;179/181 Avenue Charles de Gaulle;Neuilly / Seine;;92200;France
title:Ingénieur développeur
fn:Malderez Cédric