File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting error while creating keysotre

 
hossein arabi
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I am trying to create a keystore using JCE and till now I have created the X509Certificate and keystore but when I wanna run it I will face this error:
Exception in thread "main" java.io.IOException: exception decrypting data - java.security.InvalidKeyException: Illegal key size
at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.cryptData(Unknown Source)
at org.bouncycastle.jce.provider.JDKPKCS12KeyStore.engineStore(Unknown Source)

and this is my code:


this is my function to create the keystore:


in this program I want to just store my self signed certificate + private key into the keysotre.
I will be thankful if any one tell me what the error and tell me how to remove it.
thanks.
 
hossein arabi
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks I have solved the problem
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the solution? It may help others that have a similar problem
 
hossein arabi
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martijn Verburg wrote:Can you post the solution? It may help others that have a similar problem

the problem is the POLICY FILE....just update it
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic