Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > BOOK: Beginning Cryptography with Java
|
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 April 8th, 2010, 04:13 PM
Registered User
 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question Chapter 9 - EnvelopedSignedMailExample

Hi;

I have little trouble running the sample "EnvelopedSignedMailExample" in chapter9. Its throws following exception

Exception in thread "main" java.lang.IllegalStateException: DEF length 48 object truncated by 48
at org.bouncycastle.asn1.DERSequenceParser.getDERObje ct(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector( Unknown Source)
at org.bouncycastle.asn1.DERSequenceParser.getDERObje ct(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector( Unknown Source)
at org.bouncycastle.asn1.DERSequenceParser.getDERObje ct(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector( Unknown Source)
at org.bouncycastle.asn1.BERTaggedObjectParser.rLoadV ector(Unknown Source)
at org.bouncycastle.asn1.BERTaggedObjectParser.getDER Object(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector( Unknown Source)
at org.bouncycastle.asn1.BERSequenceParser.getDERObje ct(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector( Unknown Source)
at org.bouncycastle.asn1.BERTaggedObjectParser.rLoadV ector(Unknown Source)
at org.bouncycastle.asn1.BERTaggedObjectParser.getDER Object(Unknown Source)
at org.bouncycastle.asn1.ASN1StreamParser.readVector( Unknown Source)
at org.bouncycastle.asn1.BERSequenceParser.getDERObje ct(Unknown Source)
at org.bouncycastle.asn1.ASN1InputStream.readObject(U nknown Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
at org.bouncycastle.cms.CMSUtils.readContentInfo(Unkn own Source)
at org.bouncycastle.cms.CMSSignedData.<init>(Unknown Source)
at org.bouncycastle.mail.smime.SMIMESigned.<init>(Unk nown Source)


The exception was for statement

SMIMESigned signed = new SMIMESigned((MimeMultipart)res.getContent());

Can anyone help or has anyone have the same problem?

I am running in JDeveloper 11.

Thank in Advance.
JK.
 
Old April 9th, 2010, 03:14 PM
Registered User
 
Join Date: Apr 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solution

Hi;

Its actually caused by older version of JavaMail API and JAF. I downloaded the latest API for both, and now the application is running fine.

GREAT BOOK!!!!

Thanks





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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