diff options
Diffstat (limited to 'pdf-over-gui')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/MobileBKUConnector.java | 15 |
1 files changed, 14 insertions, 1 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 762b9316..891ff9f4 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 @@ -96,7 +96,7 @@ public class MobileBKUConnector implements BkuSlConnector { ATrustHandler aHandler = (ATrustHandler) handler;
String response = aHandler.postSMSRequest();
aHandler.handleCredentialsResponse(response);
- } else if (((ATrustStatus) this.state.getStatus()).getErrorMessage().equals("cancel")) { //$NON-NLS-1$
+ } else if (handleErrorMessage()) {
throw new SignatureException(new IllegalStateException());
} else {
handler.handlePolling(responseData);
@@ -212,4 +212,17 @@ public class MobileBKUConnector implements BkuSlConnector { return signingState.getSignatureResponse();
}
+ private boolean handleErrorMessage() {
+
+ if (this.state.getStatus() instanceof ATrustStatus) {
+ ATrustStatus aStatus = (ATrustStatus)this.state.getStatus() ;
+ if (aStatus.getErrorMessage() != null &&
+ aStatus.getErrorMessage().equals("cancel")) { //$NON-NLS-1$
+ ((ATrustStatus)this.state.getStatus()).setErrorMessage(null);
+ return true;
+ }
+ }
+ return false;
+ }
+
}
|