Hi all,
My class has KeyStore instance as static field.
When KeyStore#getKey(String alias, char[] password) mthod is called with right alias and password on multi-thread environment, normaly I can get Key object successfully.
But rarely following UnrecoverableKeyException is thrown from that method.
Caused by: java.security.UnrecoverableKeyException: Given final block not properly padded
at com.sun.crypto.provider.SunJCE_z.a(DashoA13*..)
at com.sun.crypto.provider.JceKeyStore.engineGetKey(DashoA13*..)
at java.security.KeyStore.getKey(KeyStore.java:763)
Is KeyStore (specifically JceKeyStore) thread safe?
Thanks in advance.