[kaffe] java.security.KeyStoreException: Cannot store key type
Dalibor Topic
robilad at kaffe.org
Wed Aug 18 09:47:05 PDT 2004
pankaj sharma wrote:
>
> hi , i am getting this error'
> java.security.KeyStoreException: Cannot store key type.
> at au.com.eracom.crypto.provider.CryptokiKeyStoreBase.toBasicKey(CryptokiKeyStoreBase.java:790)
> at au.com.eracom.crypto.provider.CryptokiKeyStoreBase.engineSetKeyEntry(CryptokiKeyStoreBase.java:332)
> at java.security.KeyStore.setKeyEntry(KeyStore.java:397)
> at com.zero.mass.remoteperso.StoreKey2HSM.main(StoreKey2HSM.java:63)
>
>
>
> this is my code**************
> String addKeyName = "kkkkk";
> KeyStore keyStore = KeyStore.getInstance("CRYPTOKI", p.getName());
> byte [] IMKac = {(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,(byte)61,
> (byte)70,(byte)70,(byte)70,(byte)70,(byte)70,(byte)70,(byte)70,(byte)70
>
> };
>
> try
> {
> System.out.println("Key now " +keyStore.getKey(addKeyName,null));
> // keyStore.setKeyEntry(addKeyName, IMKac, null);
>
> keyStore.setKeyEntry(addKeyName, IMKacKey, null, null);
> //keyStore.setKeyEntry(addKeyName, skey, null, null);
> }
> catch(Exception ee)
> {
> System.out.println("EXCEPTION DURING BYTE KEY ENTRY : " + ee);
> ee.printStackTrace();
>
> }
>
Thank you for your bug report!
Unfortunately, I failed to compile your source code. Please post a
self-contained, small (5-10 lines) compileable class that shows the
problem you have experienced.
cheers,
dalibor topic
More information about the kaffe
mailing list