From 00608b98f845630ce45c6102188df992a381d14a Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Mon, 7 Nov 2022 16:04:23 +0100 Subject: keep cached keystore password on config load (cf. #131) --- .../composites/configuration/KeystoreConfigurationComposite.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java index 1a0d4f0f..61e87b56 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java @@ -434,8 +434,13 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { config.keystoreType = provider.getKeyStoreTypePersistent(); config.keystoreAlias = provider.getKeyStoreAliasPersistent(); config.keystorePassStorageType = provider.getKeyStorePassStorageType(); - config.keystoreStorePass = provider.getKeyStoreStorePassPersistent(); - config.keystoreKeyPass = provider.getKeyStoreKeyPassPersistent(); + if (config.keystorePassStorageType == KeyStorePassStorageType.DISK) { + config.keystoreStorePass = provider.getKeyStoreStorePassPersistent(); + config.keystoreKeyPass = provider.getKeyStoreKeyPassPersistent(); + } else if (config.keystorePassStorageType == KeyStorePassStorageType.MEMORY) { + config.keystoreStorePass = provider.getKeyStoreStorePass(); + config.keystoreKeyPass = provider.getKeyStoreKeyPass(); + } } /* -- cgit v1.2.3