1

I'm trying to migrate my spring service from java Oracle 1.8 to IBM 1.8

final KeyStore ks = KeyStore.getInstance("PKCS12");
ks.load(new FileInputStream(new File(keystore)), "".toCharArray());

final KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
kmf.init(ks, "".toCharArray());

getting error from ks.load: "java.io.IOException: getSecretKey failed: Password is not ASCII"

when I tried null at load and init: the load passed but the kmf.init throws null error. (KeyStore: KeyStoreSpi: engineGetKey)

when I tried null at load and "".toCharArray() at kmf.init: the load passed the kmf.init throws "Password is not ASCII". (KeyStore: KeyStoreSpi: engineGetKey)

Additional information:
default security provider : com.ibm.crypto.provider.IBMJCE
PKCS12 = PKCS12KeyStoreOracle

I also tried to open the .p12 file using openssl and the "Enter Import Password:" was just ENTER (empty pass)

CAPSLOCK
  • 6,243
  • 3
  • 33
  • 56
E.Bash
  • 21
  • 3

0 Answers0