www.Go4Support.com    forums.go4support.com    Forums  Hop To Forum Categories  Hardware  Hop To Forums  eToken    Using eToken in Java
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Posted
Hi, anyone knows how to generate rsa keys in order to generate certificate request in java using eToken Pro??

I have problems generating the keys under J2SE 1.5

attached is the code

Please help me

Regards

TokenTest.java (2 KB, 13 downloads) use code
 
Posts: 3 | Registered: 22 August 2008Reply With QuoteReport This Post
Posted Hide Post
Hi folks

I made some changes in the token configuration file for JAva, i put the etoken pro in compatibility mode, but i have other problem, when i generated the key by code, and then receive the certificate (including all the chain, the CA certificate is in the etoken) i cannot save the private key and the certificate chain in the etoken, this errors appears:

Exception in thread "main" java.security.KeyStoreException: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TEMPLATE_INCONSISTENT
at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1067)
at java.security.KeyStore.setEntry(KeyStore.java:1254)
at TokenTest.main(TokenTest.java:165)
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_TEMPLATE_INCONSISTENT
at sun.security.pkcs11.wrapper.PKCS11.C_CreateObject(Native Method)
at sun.security.pkcs11.P11KeyStore.storeCert(P11KeyStore.java:1560)
at sun.security.pkcs11.P11KeyStore.storeChain(P11KeyStore.java:1575)
at sun.security.pkcs11.P11KeyStore.storePkey(P11KeyStore.java:1679)
at sun.security.pkcs11.P11KeyStore.engineSetEntry(P11KeyStore.java:1063)
... 2 more


Please anyone has the proper configuration in oprder to store the key entry?

Regards
 
Posts: 3 | Registered: 22 August 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

www.Go4Support.com    forums.go4support.com    Forums  Hop To Forum Categories  Hardware  Hop To Forums  eToken    Using eToken in Java