diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-12-12 15:38:42 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-12-12 15:38:42 +0100 |
commit | 72cb98966c0d631ed4741bf071c621fd36f33fd6 (patch) | |
tree | 1aaf0d11bf93e786518c4c0442e6916a63ab9b02 /pdf-over-gui/src/main/java/at | |
parent | 778707efcd48b17c75a2e0f58b937d4d1db43c3e (diff) | |
download | mocca-72cb98966c0d631ed4741bf071c621fd36f33fd6.tar.gz mocca-72cb98966c0d631ed4741bf071c621fd36f33fd6.tar.bz2 mocca-72cb98966c0d631ed4741bf071c621fd36f33fd6.zip |
Display security layer errors from mobile BKU
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.java | 11 |
1 files changed, 8 insertions, 3 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 f19c19bb..7112bd94 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 @@ -33,6 +33,7 @@ import at.asit.pdfover.gui.controls.Dialog.ICON; import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.MobileBKUState; import at.asit.pdfover.signator.SLResponse; +import at.asit.pdfover.signator.SignatureException; /** * A-Trust mobile BKU handler @@ -137,9 +138,13 @@ public class ATrustHandler extends MobileBKUHandler { // error page // extract error text! - String errorMessage = MobileBKUHelper.extractTag(responseData, "<span id=\"Label1\" class=\"ErrorClass\">", "</span>"); //$NON-NLS-1$ //$NON-NLS-2$ - - status.setErrorMessage(errorMessage); + try { + String errorMessage = MobileBKUHelper.extractTag(responseData, "<span id=\"Label1\" class=\"ErrorClass\">", "</span>"); //$NON-NLS-1$ //$NON-NLS-2$ + status.setErrorMessage(errorMessage); + } catch (Exception e) { + throw new SignatureException(MobileBKUHelper.extractTag(responseData, "<sl:ErrorCode>", "</sl:ErrorCode>") + ": " + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + MobileBKUHelper.extractTag(responseData, "<sl:Info>", "</sl:Info>")); //$NON-NLS-1$ //$NON-NLS-2$ + } // force UI again! status.setMobilePassword(null); |