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 May 6th, 2007, 02:02 PM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CMS Envelope problem chapter 9

Hi
Can someone help me. I still get these errors when I try to compile classes from book. Logs below:

KeyTransEnvelopedDataExample.class
xception in thread "main" org.bouncycastle.cms.CMSException: key inappropriate for algorithm.
        at org.bouncycastle.cms.CMSEnvelopedDataGenerator.gen erate(Unknown Source)
        at org.bouncycastle.cms.CMSEnvelopedDataGenerator.gen erate(Unknown Source)

Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.a(DashoA12275)
        at javax.crypto.Cipher.init(DashoA12275)
        at javax.crypto.Cipher.init(DashoA12275)
        at org.bouncycastle.cms.CMSEnvelopedDataGenerator$Rec ipientInf.toRecipientInfo(Unknown Source)
-----------------------------------------------------------
EnvelopedMailExample.class

Exception in thread "main" java.lang.NullPointerException
        at org.bouncycastle.asn1.cms.ContentInfo.getInstance( Unknown Source)
        at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
        at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
        at org.bouncycastle.cms.CMSEnvelopedData.<init>(Unkno wn Source)
        at org.bouncycastle.mail.smime.SMIMEEnveloped.<init>( Unknown Source)


 
Old May 6th, 2007, 05:15 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

This normally indicates the unrestricted jurisdiction policy files
haven't been installed. There's an example program you can use to
confirm this in the first chapter - try that first and see how you go.

Regards,

David






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 - CMS gedgecc BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 November 15th, 2012 09:19 AM
Chapter 5 CMS code update posted jminatel BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 August 24th, 2007 02:27 AM
Chapter 5 CMS extension yousaid BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 14 April 23rd, 2007 03:34 PM
problems with chapter 13 cms cyclonic BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 5 March 16th, 2007 04:25 AM
Problems with chapter 13 cms hooligan BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 6 July 24th, 2005 12:19 AM





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