Wrox Programmer Forums
|
BOOK: Beginning Cryptography with Java
This is the forum to discuss the Wrox book Beginning Cryptography with Java by David Hook; ISBN: 9780764596339
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Cryptography with Java section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 7th, 2006, 06:10 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Exception in chapter9

Hello,

Thanks for the great book!

I get exceptions in two examples of chapter 9. It happens in EnvelopedSignedMailExample and EnvelopedMailExample.

I'm using BC 133. Can anyone help me?

Cheers,
James

Exception in thread "main" java.lang.IllegalArgumentException: unknown object in factory
        at org.bouncycastle.asn1.cms.ContentInfo.getInstance( Unknown Source)
        at org.bouncycastle.cms.CMSEnvelopedData.readContentI nfo(Unknown Source)
        at org.bouncycastle.cms.CMSEnvelopedData.<init>(Unkno wn Source)
        at org.bouncycastle.mail.smime.SMIMEEnveloped.<init>( Unknown Source)
        at chapter9.EnvelopedSignedMailExample.main(Enveloped SignedMailExample.java:55)



 
Old September 9th, 2006, 02:48 AM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

This can happen if the decryption step is wrong or the data stream has become corrupted. Which version of JavaMail are you using? There have been some problems with it and Base64 encoding.

Regards,

David

 
Old January 11th, 2007, 04:06 PM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rajkaushik
Default

Hi James:
Did you solve this problem.

Raj

Quote:
quote:Originally posted by james.zeng
 Hello,

Thanks for the great book!

I get exceptions in two examples of chapter 9. It happens in EnvelopedSignedMailExample and EnvelopedMailExample.

I'm using BC 133. Can anyone help me?

Cheers,
James

Exception in thread "main" java.lang.IllegalArgumentException: unknown object in factory
        at org.bouncycastle.asn1.cms.ContentInfo.getInstance( Unknown Source)
        at org.bouncycastle.cms.CMSEnvelopedData.readContentI nfo(Unknown Source)
        at org.bouncycastle.cms.CMSEnvelopedData.<init>(Unkno wn Source)
        at org.bouncycastle.mail.smime.SMIMEEnveloped.<init>( Unknown Source)
        at chapter9.EnvelopedSignedMailExample.main(Enveloped SignedMailExample.java:55)








Similar Threads
Thread Thread Starter Forum Replies Last Post
chapter9, 295. pas BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 October 1st, 2008 04:55 AM
COM Exception muralidharan.d VS.NET 2002/2003 0 August 7th, 2007 02:49 PM
Big Bug on Page327, Chapter9 condescendent BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 April 30th, 2007 04:53 PM
Exception Ochi C# 1 January 15th, 2006 11:38 PM
How to know when an exception occurs? ecobo C# 2 December 30th, 2004 04:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.