summaryrefslogtreecommitdiff
path: root/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-10-05 11:39:07 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-10-05 11:39:07 +0200
commit4269338d2e11028a880c99eb906c93a397fd0c1f (patch)
treeaf3ab0f0988fe088e81fc946c38cf47fbaf47e07 /pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas
parentd6f4b34eae2e977cdd0339fb17302976fdae0574 (diff)
downloadpdf-over-4269338d2e11028a880c99eb906c93a397fd0c1f.tar.gz
pdf-over-4269338d2e11028a880c99eb906c93a397fd0c1f.tar.bz2
pdf-over-4269338d2e11028a880c99eb906c93a397fd0c1f.zip
FIDO2 support once again
Diffstat (limited to 'pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas')
-rw-r--r--pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java b/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
index c7be135f..561452a4 100644
--- a/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
+++ b/pdf-over-signer/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java
@@ -160,8 +160,9 @@ public class PdfAs4Signer {
Throwable rootCause = e;
while (rootCause.getCause() != null)
rootCause = rootCause.getCause();
- try { /* error code 6001 is user cancellation */
- if (((SLPdfAsException)rootCause).getMessage().startsWith("6001 :"))
+ try { /* error code 60xx is user cancellation */
+ int errorCode = Integer.parseInt(((SLPdfAsException)rootCause).getMessage().split(":",2)[0].trim());
+ if ((6000 <= errorCode) && (errorCode <= 6099))
throw new UserCancelledException();
} catch (ClassCastException e2) { /* fall through to wrapped throw */}
}