Error in ReadEncryptedMail.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Error in ReadEncryptedMail.java

Manuela Vergerio
Messaggio
-----------------------------------------------------------  
 From: Manuela Vergerio [hidden email]  
 To: [hidden email]  
 Subject: Error in ReadEncryptedMail.java
 
Hi all,
I always found an error in executing ReadEncryptedMail.java class.
Without any type of error I generate my file "encrypted.message" with CreateEncryptedMail.java and then I want to read this file using ReadEncryptedMail.java but I always have this exception:
 
 
Exception in thread "main" java.lang.IllegalArgumentException: unknown object in getInstanceFromTagged
at org.bouncycastle.asn1.ASN1Sequence.getInstance(ASN1Sequence.java:85)
at org.bouncycastle.asn1.cms.OriginatorInfo.getInstance(OriginatorInfo.java:69)
at org.bouncycastle.asn1.cms.EnvelopedData.<init>(EnvelopedData.java:69)
at org.bouncycastle.asn1.cms.EnvelopedData.getInstance(EnvelopedData.java:115)
at org.bouncycastle.cms.CMSEnvelopedData.<init>(CMSEnvelopedData.java:71)
at org.bouncycastle.cms.CMSEnvelopedData.<init>(CMSEnvelopedData.java:62)
at org.bouncycastle.mail.smime.SMIMEEnveloped.<init>(SMIMEEnveloped.java:47)
at org.bouncycastle.mail.smime.examples.ReadEncryptedMail.main(ReadEncryptedMail.java:94)
 
What's wrong?
- It's not a problem generated by my code modifications because I tried the same operations using the original crypto-129 package and classes and I always have the same exception.
- I don't change "encrypted.message" file's position from the folder that CreateEncryptedMail.java put it
 
Thanks in advance.
Best regards.
Manuela
------------------------------------------------------------------