Skip to content

How to reload config for Keystore #1

Description

@WinLordZ

I have 2 file config to load Keystore softhsm_1 and softhsm_2.
Value for file config changed, but Keystore and all alias not reload. But when I restarting JVM, value loaded with new config. How can i fix it? I've already load and instance keystore like this:

if (pkaSlot.equalsIgnoreCase("0")){
   pkcs11conf = "myPath\\softhsm_1.cfg"; //load config for slot 0
}else pkcs11conf = "myPath\\softhsm_2.cfg"

char[] password = "............".toCharArray();
provider = new sun.security.pkcs11.SunPKCS11(pkcs11conf);               
Security.addProvider(provider);

//Load keystore
keystore = KeyStore.getInstance("PKCS11");
fileInputStream = new FileInputStream(pkcs11conf);
keystore.load(fileInputStream, password);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions