aspose file tools*
The moose likes Java in General and the fly likes getting error while creating keysotre Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "getting error while creating keysotre" Watch "getting error while creating keysotre" New topic
Author

getting error while creating keysotre

hossein arabi
Greenhorn

Joined: Jan 15, 2009
Posts: 20
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

Joined: Jan 15, 2009
Posts: 20
thanks I have solved the problem
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Can you post the solution? It may help others that have a similar problem


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
hossein arabi
Greenhorn

Joined: Jan 15, 2009
Posts: 20
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
 
wood burning stoves
 
subject: getting error while creating keysotre