[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[iaik-jce] S/MIME problem trying to send encrypted message to multiple recipients !
Hello !!
I'm actually using the IAIK S/MIME lib in order to make encrypted &
signed mails.
I'm using the demo.smime.SMimeSend & demo.smime.SMimeShow samples.
I have a small problem while trying to send an encrypted mail to 2
recipients.
I have 2 PKCS#12 files for user1 & user2. I've modified the demo
samples demo.smime.SMimeSend & SMimeShow in order to encrypt &
uncrypt using thoses public/private keys !!!
Here are the troubleshoots !!!
Sending the mail:
-
Make a simple text mail.
-
>From is user1.
-
Add recipient user1 & user2 (Message class).
-
Create a EncryptedContent, add recipient user1 certificate and add recipient
user2 certificate.
-
Send the mail !
Receiving the mail:
-
Connect POP3 Server with user1.
-
Download the mail & try to uncrypt using user1 private key.
-
It works, because user1 is the first certificate used for encryption.
-
Connect POP3 Server with user2.
-
Download the mail & try to uncrypt using user2 private key.
-
It doesn't work !!!!
-
Here is the error text :
-
FROM: user1 <user1@netsecuresoftware.com>
TO: user1@netsecuresoftware.com
TO: user2@netsecuresoftware.com
SUBJECT: IAIK-S/MIME: Encrypted [RC2-CBC/40]
SendDate: Tue Oct 19 09:43:13 CEST 1999
Size: 1380
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
This message is encrypted!
Oops, got exception! Unable to decrypt symmetric key.
iaik.security.smime.SMimeException: Unable to decrypt symmetric
key.
at iaik.security.smime.SMimeEncrypted.decryptSymmetricKey(Unknown
Source)
at iaik.security.smime.EncryptedContent.decryptSymmetricKey(Unknown
Source)
at demo.smime.SMimeShow.dump(Compiled
Code)
at demo.smime.SMimeShow.show(Compiled
Code)
at demo.smime.SMimeShow.main(SMimeShow.java:85)
Ready! Press the space bar...
Can someone tell me if it is possible to send a simple mail to several
recipients.... ?
The sample demo.smime.SMimeSend seems to do that, but I cannot
manage to do it !
Thanks !
Sincerely,
Malderez Cedric.
begin:vcard
n:Malderez;Cédric
tel;fax:01 41 43 84 80
tel;work:01 41 43 84 66
x-mozilla-html:FALSE
url:http://www.netsecuresoftware.com
org:NetSecureSoftware
adr:;;179/181 Avenue Charles de Gaulle;Neuilly / Seine;;92200;France
version:2.1
email;internet:cmz@netsecuresoftware.com
title:Ingénieur développeur
x-mozilla-cpt:;800
fn:Malderez Cédric
end:vcard