summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at
diff options
context:
space:
mode:
authorTobias Kellner <tobias.kellner@iaik.tugraz.at>2016-10-25 15:55:58 +0200
committerTobias Kellner <tobias.kellner@iaik.tugraz.at>2016-10-25 17:00:13 +0200
commitb2aa9ee20c719530cebebd6778ccedde292e6df2 (patch)
tree459aed9528d7f60690d9d536be9158ffd585b002 /pdf-over-gui/src/main/java/at
parent5962867b411bc53bf14938b0312414f040986b54 (diff)
downloadmocca-b2aa9ee20c719530cebebd6778ccedde292e6df2.tar.gz
mocca-b2aa9ee20c719530cebebd6778ccedde292e6df2.tar.bz2
mocca-b2aa9ee20c719530cebebd6778ccedde292e6df2.zip
Add support for A-Trust tan app interstitial
Diffstat (limited to 'pdf-over-gui/src/main/java/at')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java20
1 files changed, 20 insertions, 0 deletions
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 32ad1741..0725a431 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
@@ -189,6 +189,26 @@ public class ATrustHandler extends MobileBKUHandler {
responseData = executePost(client, post);
log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
+ } else if (responseData.contains("tanAppInfo.aspx?sid=")) { //$NON-NLS-1$
+ // App info interstitial - skip
+ log.info("Skipping tan app interstitial"); //$NON-NLS-1$
+
+ String t_sessionID = MobileBKUHelper.extractSubstring(responseData, "tanAppInfo.aspx?sid=", "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ String t_viewState = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__VIEWSTATE", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ String t_eventValidation = MobileBKUHelper.extractValueFromTagWithParam(responseData, "", "id", "__EVENTVALIDATION", "value"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+ // Post again to skip
+ MobileBKUHelper.registerTrustedSocketFactory();
+ HttpClient client = MobileBKUHelper.getHttpClient(getStatus());
+
+ PostMethod post = new PostMethod(status.getBaseURL() + "/tanAppInfo.aspx?sid=" + t_sessionID); //$NON-NLS-1$
+ post.getParams().setContentCharset("utf-8"); //$NON-NLS-1$
+ post.addParameter("__VIEWSTATE", t_viewState); //$NON-NLS-1$
+ post.addParameter("__EVENTVALIDATION", t_eventValidation); //$NON-NLS-1$
+ post.addParameter("NextBtn", "Weiter"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ responseData = executePost(client, post);
+ log.trace("Response from mobile BKU: " + responseData); //$NON-NLS-1$
}
if (responseData.contains("signature.aspx?sid=")) { //$NON-NLS-1$