diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-09-30 12:10:35 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-09-30 12:10:35 +0200 |
commit | 281cc23ba6b50c270dc22027cab80c01d35563e7 (patch) | |
tree | a392d715fffff6282bb5a0f65707381db05a22aa /pdf-over-gui/src/main/java/at/asit | |
parent | f9278976789952fc9528f47b6d99a37d79532f68 (diff) | |
download | pdf-over-281cc23ba6b50c270dc22027cab80c01d35563e7.tar.gz pdf-over-281cc23ba6b50c270dc22027cab80c01d35563e7.tar.bz2 pdf-over-281cc23ba6b50c270dc22027cab80c01d35563e7.zip |
remove IAIK MobileBKU support, cc @tlenz
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit')
7 files changed, 4 insertions, 501 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java index dae4d007..09255956 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java @@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory; import com.google.gson.JsonNull;
import com.google.gson.JsonObject;
+import at.asit.pdfover.commons.Constants;
import at.asit.pdfover.gui.bku.mobile.ATrustHandler;
import at.asit.pdfover.gui.bku.mobile.ATrustStatus;
import at.asit.pdfover.gui.bku.mobile.MobileBKUHandler;
@@ -72,7 +73,7 @@ public class MobileBKUConnector implements BkuSlConnector { do {
// Post SL Request
try {
- String responseData = handler.postSLRequest(this.state.getURL(), request);
+ String responseData = handler.postSLRequest(Constants.MOBILE_BKU_URL, request);
// Now we have received some data lets check it:
log.trace("Response from mobile BKU: " + responseData);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java index 5d96d49e..70d1c35e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java @@ -29,7 +29,6 @@ import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringEscapeUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.program.Program;
import org.eclipse.swt.widgets.Display;
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java deleted file mode 100644 index e908ec3c..00000000 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKHandler.java +++ /dev/null @@ -1,364 +0,0 @@ -/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.bku.mobile;
-
-// Imports
-import java.io.IOException;
-import java.net.URL;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.controls.Dialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.Dialog.ICON;
-import at.asit.pdfover.commons.Messages;
-import at.asit.pdfover.gui.workflow.states.MobileBKUState;
-import at.asit.pdfover.signator.SLResponse;
-
-/**
- *
- */
-public class IAIKHandler extends MobileBKUHandler {
- /**
- * SLF4J Logger instance
- **/
- private static final Logger log = LoggerFactory.getLogger(IAIKHandler.class);
-
- Shell shell;
-
- /**
- * Constructor
- * @param state the MobileBKUState
- * @param shell the Shell
- */
- public IAIKHandler(MobileBKUState state, Shell shell) {
- super(state);
- this.shell = shell;
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUHandler#handleSLRequestResponse(java.lang.String)
- */
- @Override
- public void handleSLRequestResponse(String responseData) throws Exception {
- IAIKStatus status = getStatus();
-
- // Extract infos:
- String credentialURL = MobileBKUHelper.extractValueFromTagWithParam(responseData,
- "form", "name", "userCredLogon", "action");
- URL baseURL = new URL(status.baseURL);
- credentialURL = MobileBKUHelper.getQualifiedURL(credentialURL, baseURL);
-
- String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value");
-
- String sessionID = null;
- int si = credentialURL.indexOf("jsessionid=");
- if (si != -1)
- sessionID = credentialURL.substring(si + 11);
- else
- sessionID = status.sessionID;
-
- log.info("credentialURL: " + credentialURL);
- log.info("sessionID: " + sessionID);
- log.info("viewState: " + viewState);
-
- status.baseURL = credentialURL;
- if (sessionID != null)
- status.sessionID = sessionID;
- status.viewState = viewState;
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUHandler#postCredentials()
- */
- @Override
- public String postCredentials() throws Exception {
- IAIKStatus status = getStatus();
-
- MobileBKUHelper.registerTrustedSocketFactory();
- HttpClient client = MobileBKUHelper.getHttpClient(status);
-
- PostMethod post = new PostMethod(status.ensureSessionID(status.baseURL));
- post.getParams().setContentCharset("utf-8");
- post.addParameter("javax.faces.ViewState", status.viewState);
- post.addParameter("userCredLogon:phoneNr", status.phoneNumber);
- post.addParameter("userCredLogon:pwd", status.mobilePassword);
- post.addParameter("userCredLogon:logonButton", "userCredLogon:logonButton");
- post.addParameter("javax.faces.partial.ajax", "true");
- post.addParameter("javax.faces.source", "userCredLogon:logonButton");
- post.addParameter("javax.faces.partial.execute", "@all");
- post.addParameter("javax.faces.partial.render", "userCredLogon:userCredentialLogonPanel");
- post.addParameter("userCredLogon", "userCredLogon");
- post.addParameter("userCredLogon:j_idt33_input", "de");
-
- return executePost(client, post);
-}
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUHandler#handleCredentialsResponse(java.lang.String)
- */
- @Override
- public void handleCredentialsResponse(String responseData) throws Exception {
- IAIKStatus status = getStatus();
-
- String refVal = null;
- String signatureDataURL = null;
-
- status.errorMessage = null;
-
- if (!responseData.contains("redirection_url")) {
- // Assume that an error occurred
-
- String errorMessage;
- try {
- errorMessage = MobileBKUHelper.extractSubstring(responseData, ":errorMessage\">", "</span>");
- } catch (Exception e) {
- errorMessage = Messages.getString("error.Unexpected");
- }
- status.errorMessage = errorMessage;
-
- // force UI again!
- status.mobilePassword = null;
- return;
- }
-
- HttpClient client = MobileBKUHelper.getHttpClient(status);
-
- String redirectURL = MobileBKUHelper.extractSubstring(responseData,
- "\"redirection_url\":\"", "\"");
-
- URL baseURL = new URL(status.baseURL);
- redirectURL = MobileBKUHelper.getQualifiedURL(redirectURL, baseURL);
- redirectURL = status.ensureSessionID(redirectURL);
-
- responseData = getRedirect(client, redirectURL);
-
- if (responseData.contains("sl:InfoboxReadResponse")) {
- // credentials ok! InfoboxReadResponse
- getSigningState().signatureResponse = new SLResponse(responseData, status.server, null, null);
- return;
- }
-
- if (responseData.contains("tanCodeLogon"))
- {
- refVal = MobileBKUHelper.extractContentFromTagWithParam(responseData,
- "span", "id", "tanCodeLogon:refValue");
- }
- else
- {
- refVal = MobileBKUHelper.extractContentFromTagWithParam(responseData,
- "span", "id", "j_idt5:refValue");
- }
-
-
-
- if (responseData.contains("/error")) {
- // Error response - try again
- String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(
- responseData, "div", "id", "errorPanel:panel_content");
- if (errorMessage.contains("<br />"))
- errorMessage = errorMessage.substring(0, errorMessage.indexOf("<br />"));
- errorMessage.replace("\n", " ");
- status.errorMessage = errorMessage;
-
- status.mobilePassword = null;
- return;
- }
-
-
-
-
- String viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value");
- status.viewState = viewState;
-
- if (!responseData.contains("tanCodeLogon.jsf")) {
- // Assume that we need to confirm reference value dialog
- log.debug("viewState: " + viewState);
-
-
-
- PostMethod post = new PostMethod(redirectURL);
- post.getParams().setContentCharset("utf-8");
- post.addParameter("javax.faces.partial.ajax", "true");
- post.addParameter("javax.faces.source", "j_idt5:yesButton");
- post.addParameter("javax.faces.partial.execute", "@all");
- post.addParameter("j_idt5:yesButton", "j_idt5:yesButton");
- post.addParameter("j_idt5", "j_idt5");
- post.addParameter("javax.faces.ViewState", status.viewState);
- responseData = executePost(client, post);
-
- log.debug("Response: " + responseData);
- if (responseData.contains("/error")) {
- // Error response - try again
- String errorMessage = Messages.getString("error.Unexpected");
- status.errorMessage = errorMessage;
-
- status.mobilePassword = null;
- return;
- }
-
- redirectURL = MobileBKUHelper.extractSubstring(responseData,
- "redirect url=\"", "\"");
- baseURL = new URL(status.baseURL);
- redirectURL = MobileBKUHelper.getQualifiedURL(redirectURL, baseURL);
- redirectURL = status.ensureSessionID(redirectURL);
-
- responseData = getRedirect(client, redirectURL);
-
- viewState = MobileBKUHelper.extractValueFromTagWithParam(
- responseData, "input", "name", "javax.faces.ViewState", "value");
- status.viewState = viewState;
- }
-
- signatureDataURL = status.baseURL;
- signatureDataURL = signatureDataURL.substring(0, signatureDataURL.lastIndexOf('/') + 1);
- signatureDataURL += "viewer.jsf" +
- MobileBKUHelper.extractSubstring(responseData, "viewer.jsf", "\"");
- signatureDataURL += (signatureDataURL.contains("?") ? "&" : "?") +
- "pdfoversessionid=" + status.sessionID;
-
- String tanURL = MobileBKUHelper.extractValueFromTagWithParam(responseData,
- "form", "name", "tanCodeLogon", "action");
- baseURL = new URL(status.baseURL);
- tanURL = MobileBKUHelper.getQualifiedURL(tanURL, baseURL);
- tanURL = status.ensureSessionID(tanURL);
-
- log.debug("reference value: " + refVal);
- log.debug("signatureDataURL: " + signatureDataURL);
- log.debug("tanURL: " + tanURL);
- log.debug("viewState: " + viewState);
-
- status.refVal = refVal;
- status.signatureDataURL = signatureDataURL;
- status.baseURL = tanURL;
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUHandler#postTAN()
- */
- @Override
- public String postTAN() throws Exception {
- IAIKStatus status = getStatus();
-
- MobileBKUHelper.registerTrustedSocketFactory();
- HttpClient client = MobileBKUHelper.getHttpClient(status);
-
- PostMethod post = new PostMethod(status.baseURL);
- post.getParams().setContentCharset("utf-8");
- post.addParameter("javax.faces.ViewState", status.viewState);
- post.addParameter("tanCodeLogon", "tanCodeLogon");
- post.addParameter("tanCodeLogon:signButton", "");
- post.addParameter("tanCodeLogon:authCode", status.tan);
- post.addParameter("referenceValue", status.refVal);
-
- return executePost(client, post);
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUHandler#handleTANResponse(java.lang.String)
- */
- @Override
- public void handleTANResponse(String responseData) throws Exception {
- final IAIKStatus status = getStatus();
- status.errorMessage = null;
- if (responseData.contains("sl:CreateCMSSignatureResponse xmlns:sl")) {
- // success
- getSigningState().signatureResponse = new SLResponse(responseData, status.server, null, null);
- } else {
- try {
- String errorMessage = MobileBKUHelper.extractContentFromTagWithParam(
- responseData, "p", "class", "ui-messages-error ui-messages-error-signing");
- status.errorMessage = errorMessage;
- log.error(errorMessage);
-
- //Go back to TAN entry
- MobileBKUHelper.registerTrustedSocketFactory();
- HttpClient client = MobileBKUHelper.getHttpClient(status);
-
- PostMethod post = new PostMethod(status.baseURL);
- post.getParams().setContentCharset("utf-8");
- post.addParameter("javax.faces.partial.ajax", "true");
- post.addParameter("javax.faces.source", "tanCodeLogon:backbutton");
- post.addParameter("javax.faces.partial.execute", "@all");
- post.addParameter("javax.faces.partial.render", "tanCodeLogon:tanCodeLogonPanel");
- post.addParameter("tanCodeLogon:backbutton", "tanCodeLogon:backbutton");
- post.addParameter("tanCodeLogon", "tanCodeLogon");
- post.addParameter("javax.faces.ViewState", status.viewState);
-
- executePost(client, post);
- } catch (Exception e) {
- // Assume that wrong TAN was entered too many times
- Display.getDefault().syncExec(() -> {
- Dialog dialog = new Dialog(IAIKHandler.this.shell, Messages.getString("common.warning"),
- Messages.getString("mobileBKU.tan_tries_exceeded"),
- BUTTONS.OK_CANCEL, ICON.QUESTION);
- // TODO: ALSO A COLOSSAL HACK HERE
- if (dialog.open() == SWT.CANCEL) {
- // Go back to BKU Selection
- status.tanTries = -1;
- } else {
- // Start signature process over
- status.tanTries = -2;
- }
- });
- }
- }
- }
-
- @Override
- public IAIKStatus getStatus() {
- return (IAIKStatus) state.status;
- }
-
- private String getRedirect(HttpClient client, String redirectURL) throws HttpException, IOException {
- redirectURL = getStatus().ensureSessionID(redirectURL);
- log.debug("Sending get request to URL " + redirectURL);
-
- GetMethod get = new GetMethod(redirectURL);
- int returnCode = client.executeMethod(get);
- if (returnCode != HttpStatus.SC_OK) {
- throw new HttpException(HttpStatus.getStatusText(returnCode));
- }
- String responseData = get.getResponseBodyAsString();
- log.debug("Response: " + responseData);
- return responseData;
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.bku.mobile.MobileBKUHandler#useBase64Request()
- */
- @Override
- public boolean useBase64Request() {
- return false;
- }
-
- @Override
- public boolean handlePolling() {
- //nothing todo
- return true;
- }
-}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java deleted file mode 100644 index c855c99a..00000000 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/IAIKStatus.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2012 by A-SIT, Secure Information Technology Center Austria - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://joinup.ec.europa.eu/software/page/eupl - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - */ -package at.asit.pdfover.gui.bku.mobile; - -import at.asit.pdfover.gui.workflow.config.ConfigurationManager; - -/** - * IAIK MobileBKUStatus implementation - */ -public class IAIKStatus extends MobileBKUStatus { - - /** Maximum number of TAN tries */ - public static final int MOBILE_MAX_TAN_TRIES = 3; - - public String viewState; - - /** - * Constructor - * @param provider the ConfigProvider - */ - public IAIKStatus(ConfigurationManager provider) { - this.phoneNumber = provider.getDefaultMobileNumber(); - this.mobilePassword = provider.getDefaultMobilePassword(); - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus#getMaxTanTries() - */ - @Override - public int getMaxTanTries() { - return MOBILE_MAX_TAN_TRIES; - } - - @Override - public String ensureSessionID(String url) - { - if (url.contains("jsessionid=")) - return url; - - if (this.sessionID != null) - url += ";jsessionid=" + this.sessionID; - return url; - } -} 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;
@@ -146,14 +132,6 @@ public class MobileBKUState extends State { }
/**
- * Get the mobile BKU URL
- * @return the mobile BKU URL
- */
- public String getURL() {
- return getStateMachine().configProvider.getMobileBKUURL();
- }
-
- /**
* @return the signingState
*/
public PdfAs4SigningState getSigningState() {
|