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 September 6th, 2006, 03:04 AM
bc bc is offline
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default IllegalArgumentException in chapter 6

Hi,
I can run all the examples in the book from chapter 1 to chapter 5 without any problem.

But, In chapter 5, the programs like X509V1CreateExample, X509V3CreateExample, and some others gives the following exception.
Can anybody help me?

Ibrahim
Regards

Exception in thread "main" java.lang.IllegalArgumentException: Unknown signature type requested
    at org.bouncycastle.x509.X509V1CertificateGenerator.s etSignatureAlgorithm(Unknown Source)
    at chapter6.X509V1CreateExample.generateV1Certificate (X509V1CreateExample.java:30)
    at chapter6.X509V1CreateExample.main(X509V1CreateExam ple.java:43)


 
Old September 6th, 2006, 06:54 PM
dgh dgh is offline
Wrox Author
 
Join Date: Aug 2005
Posts: 206
Thanks: 0
Thanked 20 Times in 20 Posts
Default

Two things worth checking, what version of BC are you using? What is the signature algorithm being requested in your version of the example?

Regards,

David

 
Old September 7th, 2006, 05:28 AM
bc bc is offline
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The code I used is from the website of the book. (X509V1CreateExample)


bc version : 133
signature algorithm: "SHA256WithRSAEncryption"

Thanks David

Regards

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

Hmmm... This is a bit of a guess, but you might have a locale issue - there was a problem reported recently with toUpperCase() in some areas. Try the beta at http://www.bouncycastle.org/betas and let me know how you go.

Regards,

David

 
Old September 7th, 2006, 07:37 AM
bc bc is offline
Registered User
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

David,
it worked with the beta bc version.

Thanks...
Ibrahim







Similar Threads
Thread Thread Starter Forum Replies Last Post
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
java.lang.IllegalArgumentException: No bean specif vijayks EJB 0 June 1st, 2007 05:37 AM





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