From 281cc23ba6b50c270dc22027cab80c01d35563e7 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Fri, 30 Sep 2022 12:10:35 +0200 Subject: remove IAIK MobileBKU support, cc @tlenz --- .../workflow/config/ConfigurationDataInMemory.java | 10 ----- .../gui/workflow/config/ConfigurationManager.java | 44 ---------------------- .../gui/workflow/states/MobileBKUState.java | 26 +------------ 3 files changed, 2 insertions(+), 78 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java index 31b351f8..98a858d1 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationDataInMemory.java @@ -30,7 +30,6 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.commons.Constants; import at.asit.pdfover.gui.bku.mobile.MobileBKUHelper; -import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidPortException; import at.asit.pdfover.signator.BKUs; @@ -132,15 +131,6 @@ public class ConfigurationDataInMemory { /** Holds the PDF/A compatibility setting */ public boolean signaturePDFACompat = false; - /** Holds the mobile BKU URL */ - public String mobileBKUURL = Constants.DEFAULT_MOBILE_BKU_URL; - - /** Holds the mobile BKU type */ - public MobileBKUs mobileBKUType = ConfigurationManager.DEFAULT_MOBILE_BKU_TYPE; - - /** Holds the mobile BKU BASE64 setting */ - protected boolean mobileBKUBase64 = false; - /** Holds the default signature position */ public boolean autoPositionSignature = false; diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java index d8c8320c..51a01420 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java @@ -196,27 +196,6 @@ public class ConfigurationManager { if (compat != null) setSignaturePdfACompatPersistent(compat.equalsIgnoreCase(Constants.TRUE)); - String bkuUrl = diskConfig.getProperty(Constants.CFG_MOBILE_BKU_URL); - if (bkuUrl != null && !bkuUrl.isEmpty()) - this.configuration.mobileBKUURL = bkuUrl; - - String bkuType = diskConfig.getProperty(Constants.CFG_MOBILE_BKU_TYPE); - - if (bkuType != null && !bkuType.isEmpty()) - { - try - { - this.configuration.mobileBKUType = MobileBKUs.valueOf(bkuType.trim().toUpperCase()); - } catch (IllegalArgumentException e) { - log.error("Invalid BKU type: " + bkuType); - this.configuration.mobileBKUType = DEFAULT_MOBILE_BKU_TYPE; - } - } - - String useBase64 = diskConfig.getProperty(Constants.CFG_MOBILE_BKU_BASE64); - if (useBase64 != null) - this.configuration.mobileBKUBase64 = useBase64.equalsIgnoreCase(Constants.TRUE); - String proxyPortString = diskConfig.getProperty(Constants.CFG_PROXY_PORT); if (proxyPortString != null && !proxyPortString.trim().isEmpty()) { @@ -368,17 +347,6 @@ public class ConfigurationManager { else props.setProperty(Constants.CFG_SIGNATURE_POSITION, "auto"); - String mobileBKUURL = getMobileBKUURL(); - if (!mobileBKUURL.equals(Constants.DEFAULT_MOBILE_BKU_URL)) - props.setProperty(Constants.CFG_MOBILE_BKU_URL, mobileBKUURL); - - MobileBKUs mobileBKUType = getMobileBKUType(); - if (mobileBKUType != DEFAULT_MOBILE_BKU_TYPE) - props.setProperty(Constants.CFG_MOBILE_BKU_TYPE, mobileBKUType.toString()); - - if (getMobileBKUBase64()) - props.setProperty(Constants.CFG_MOBILE_BKU_BASE64, Constants.TRUE); - if (Constants.THEME != Constants.Themes.DEFAULT) props.setProperty(Constants.CFG_THEME, Constants.THEME.name()); @@ -728,18 +696,6 @@ public class ConfigurationManager { return outputFolder; } - public String getMobileBKUURL() { - return this.configuration.mobileBKUURL; - } - - public MobileBKUs getMobileBKUType() { - return this.configuration.mobileBKUType; - } - - public boolean getMobileBKUBase64() { - return this.configuration.mobileBKUBase64; - } - public void setSignatureNotePersistent(String note) { if (note == null || note.trim().isEmpty()) { this.configuration.signatureNote = STRING_EMPTY; diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java index 456b3d64..76072e27 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java @@ -36,8 +36,6 @@ import at.asit.pdfover.gui.MainWindowBehavior; import at.asit.pdfover.gui.bku.MobileBKUConnector; import at.asit.pdfover.gui.bku.mobile.ATrustHandler; import at.asit.pdfover.gui.bku.mobile.ATrustStatus; -import at.asit.pdfover.gui.bku.mobile.IAIKHandler; -import at.asit.pdfover.gui.bku.mobile.IAIKStatus; import at.asit.pdfover.gui.bku.mobile.MobileBKUHandler; import at.asit.pdfover.gui.bku.mobile.MobileBKUStatus; import at.asit.pdfover.gui.composites.MobileBKUEnterNumberComposite; @@ -68,20 +66,8 @@ public class MobileBKUState extends State { public MobileBKUState(StateMachine stateMachine) { super(stateMachine); ConfigurationManager provider = stateMachine.configProvider; - switch(provider.getMobileBKUType()) { - case A_TRUST: - this.status = new ATrustStatus(provider); - this.handler = new ATrustHandler(this, stateMachine.getMainShell(), provider.getMobileBKUBase64()); - break; - - case IAIK: - this.status = new IAIKStatus(provider); - this.handler = new IAIKHandler(this, stateMachine.getMainShell()); - break; - - default: - throw new RuntimeException("Unexpected mobileBKUType"); - } + this.status = new ATrustStatus(provider); + this.handler = new ATrustHandler(this, stateMachine.getMainShell(), false); } MobileBKUEnterTANComposite mobileBKUEnterTANComposite = null; @@ -145,14 +131,6 @@ public class MobileBKUState extends State { return this.mobileBKUFingerprintComposite; } - /** - * Get the mobile BKU URL - * @return the mobile BKU URL - */ - public String getURL() { - return getStateMachine().configProvider.getMobileBKUURL(); - } - /** * @return the signingState */ -- cgit v1.2.3