java.security.UnrecoverableKeyException: Get Key failed: / by zero
at
com.sun.net.ssl.internal.ssl.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java
:268)
at java.security.KeyStore.getKey(KeyStore.java:731)
at
com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerI
mpl.java:111)
at
com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyMan
agerFactoryImpl.java:41)
at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:192)
at ... (my stuff)
Caused by: java.lang.ArithmeticException: / by zero
at com.sun.crypto.provider.SunJCE_ab.a(DashoA12275)
at com.sun.crypto.provider.SunJCE_ab.a(DashoA12275)
at com.sun.crypto.provider.SunJCE_ab.a(DashoA12275)
at com.sun.crypto.provider.SunJCE_ab.a(DashoA12275)
at
com.sun.crypto.provider.PKCS12PBECipherCore$PBEWithSHA1AndDESede.engineInit(
DashoA12275)
at javax.crypto.Cipher.a(DashoA12275)
at javax.crypto.Cipher.a(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at
com.sun.net.ssl.internal.ssl.PKCS12KeyStore.engineGetKey(PKCS12KeyStore.java
:249)
... 7 more
javax.net.ssl.KeyManagerFactory.init was called like this:
kmf.init( ks, "".toCharArray() );
where ks is a "PKCS12" KeyStore loaded from a .p12 file (which is correctly
interpreted by other (non-Java) tools, so I'm not looking at an invalid .p12
file as the first thing to suspect).
--
Tim Ward
Brett Ward Limited - www.brettward.co.uk
If I had to make a guess, I'd say somewhere, someone tried to divide a
number by zero.
FWIW, the javadocs say:
@exception UnrecoverableKeyException if the key cannot be recovered (e.g.,
the given password is wrong).
- Oliver