From 476590d1117aedafe51b99ffdf19ec1f8a805665 Mon Sep 17 00:00:00 2001 From: Kai Kramer Date: Mon, 27 Nov 2017 23:57:37 +0100 Subject: [PATCH] Fixed bug that PKCS#11 in combination with Java 9 caused an error --- kse/src/org/kse/gui/dialogs/DOpenPkcs11KeyStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);