summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
diff options
context:
space:
mode:
authorTobias Kellner <tobias.kellner@iaik.tugraz.at>2015-02-23 15:31:03 +0100
committerTobias Kellner <tobias.kellner@iaik.tugraz.at>2015-02-23 15:33:28 +0100
commit96ea325cbce319f64ad548908e395825bbdca83f (patch)
tree355ca0a962f547a82d532e477e58e1a1fddad760 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow
parent7b6860087f50b7576c31f7aa50714d3fa7a9b228 (diff)
downloadpdf-over-96ea325cbce319f64ad548908e395825bbdca83f.tar.gz
pdf-over-96ea325cbce319f64ad548908e395825bbdca83f.tar.bz2
pdf-over-96ea325cbce319f64ad548908e395825bbdca83f.zip
Make BASE64 usage configurable for a-trust mobile bku
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java13
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java12
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java21
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java9
5 files changed, 58 insertions, 3 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
index d4489e27..ac67fb9b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
@@ -133,6 +133,12 @@ public interface ConfigProvider {
public MobileBKUs getMobileBKUType();
/**
+ * Gets the mobile BKU BASE64 setting
+ * @return the mobile BKU BASE64 setting
+ */
+ public boolean getMobileBKUBase64();
+
+ /**
* Get the signature note text to use
* @return the signature note text
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index 5ec55555..2bf59a02 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -151,6 +151,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
}
}
+ String useBase64 = config.getProperty(Constants.CFG_MOBILE_BKU_BASE64);
+ if (useBase64 != null)
+ this.configuration.setMobileBKUBase64(useBase64.equalsIgnoreCase(Constants.TRUE));
+
// Set Proxy Port
String proxyPortString = config
.getProperty(Constants.CFG_PROXY_PORT);
@@ -950,6 +954,15 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
return this.configuration.getMobileBKUType();
}
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigProvider#getMobileBKUBase64()
+ */
+ @Override
+ public boolean getMobileBKUBase64() {
+ return this.configuration.getMobileBKUBase64();
+ }
+
/*
* (non-Javadoc)
*
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
index 6d5e888e..6215fb87 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
@@ -232,6 +232,18 @@ public interface ConfigurationContainer {
public void setMobileBKUType(MobileBKUs bkuType);
/**
+ * Gets the mobile BKU BASE64 setting
+ * @return the mobile BKU BASE64 setting
+ */
+ public boolean getMobileBKUBase64();
+
+ /**
+ * Sets the mobile BKU BASE64 setting
+ * @param useBase64 the mobile BKU BASE64 setting
+ */
+ public void setMobileBKUBase64(boolean useBase64);
+
+ /**
* Gets the default signature position
* @return the default signature position
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
index 726e5b4b..c7ec2c34 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
@@ -100,6 +100,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/** Holds the mobile BKU type */
protected MobileBKUs mobileBKUType = Constants.DEFAULT_MOBILE_BKU_TYPE;
+ /** Holds the mobile BKU BASE64 setting */
+ protected boolean mobileBKUBase64 = false;
+
/** Holds the main window size */
protected Point mainWindowSize = null;
@@ -435,6 +438,24 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getMobileBKUBase64()
+ */
+ @Override
+ public boolean getMobileBKUBase64() {
+ return this.mobileBKUBase64;
+ }
+
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getMobileBKUBase64(boolean)
+ */
+ @Override
+ public void setMobileBKUBase64(boolean useBase64) {
+ this.mobileBKUBase64 = useBase64;
+ }
+
+
+ /* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.ConfigurationContainer#getSignaturePosition()
*/
@Override
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 6b0d6684..68f0f02a 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
@@ -49,10 +49,13 @@ public class MobileBKUState extends State {
*/
public MobileBKUState(StateMachine stateMachine) {
super(stateMachine);
- switch(getStateMachine().getConfigProvider().getMobileBKUType()) {
+ ConfigProvider provider = stateMachine.getConfigProvider();
+ switch(provider.getMobileBKUType()) {
case A_TRUST:
- this.status = new ATrustStatus(getStateMachine().getConfigProvider());
- this.handler = new ATrustHandler(this, getStateMachine().getGUIProvider().getMainShell());
+ this.status = new ATrustStatus(provider);
+ this.handler = new ATrustHandler(this,
+ stateMachine.getGUIProvider().getMainShell(),
+ provider.getMobileBKUBase64());
break;
case IAIK: