Provider p = new SunPKCS11(configName);
char[]pin = "****".toCharArray();
KeyStore ks = KeyStore.getInstance("PKCS11", p);
ks.load(null, this.pin);
if (-1 == Security.addProvider(this.p)) {
throw new RuntimeException("Could not add security provider");
}
How can I reload the keys ? Every time I run the code, I get the same instance of a KeyStore object, so the same keys.