diff --git a/kse/src/org/kse/gui/dialogs/DOpenPkcs11KeyStore.java b/kse/src/org/kse/gui/dialogs/DOpenPkcs11KeyStore.java index d15ca9401..7ea14689f 100644 --- a/kse/src/org/kse/gui/dialogs/DOpenPkcs11KeyStore.java +++ b/kse/src/org/kse/gui/dialogs/DOpenPkcs11KeyStore.java @@ -308,7 +308,7 @@ private void okPressed() { pkcs11ConfigSettings = "--" + pkcs11ConfigSettings; // p11Provider.configure(pkcs11ConfigSettings); Method method = Provider.class.getMethod("configure", String.class); - method.invoke(p11Provider, pkcs11ConfigSettings); + p11Provider = (Provider) method.invoke(p11Provider, pkcs11ConfigSettings); } else { Class cl = Class.forName("sun.security.pkcs11.SunPKCS11"); Constructor cons = cl.getConstructor(InputStream.class);