[kaffe] java.security.KeyStoreException: Cannot store key type
pankaj sharma
pankaj_kalu at rediffmail.com
Sat Aug 14 03:55:11 PDT 2004
An HTML attachment was scrubbed...
URL: http://pogo.kaffe.org/pipermail/kaffe/attachments/20040814/5e2302b1/attachment.htm
-------------- next part --------------
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();
}
More information about the kaffe
mailing list