有人知道如何更改java.security.KeyStore
的密码吗?以下是我创建KeyStore
的方法:
keyStore = KeyStore.getInstance("PKCS12", BouncyCastleProvider.PROVIDER_NAME);
keyStore.load(null, null);
if (keyStore.containsAlias(CERTIFICATE_ALIAS)) {
keyStore.deleteEntry(CERTIFICATE_ALIAS);
}
keyStore.setKeyEntry(PRIVATE_KEY_ALIAS, privateKey, password, chain);
keyStoreFileOutputStream = application.openFileOutput(KEY_STORE_FILE_NAME, Application.MODE_PRIVATE);
keyStore.store(keyStoreFileOutputStream, password);