From c5d9bde3cbec6d2a5344186feb9bb9dac275c17a Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Wed, 25 Nov 2020 10:33:25 +0100 Subject: disabled siganture placeholder preview --- .../src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustHandler.java | 3 +-- .../asit/pdfover/gui/composites/SimpleConfigurationComposite.java | 1 + .../java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java | 6 ++++-- .../java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 2 +- 4 files changed, 7 insertions(+), 5 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 c52aba0c..7d3f986a 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 @@ -508,8 +508,7 @@ public class ATrustHandler extends MobileBKUHandler { try { do { - String baseUrl = "https://www.handy-signatur.at/mobile/https-security-layer-request/"; - urlconnection = new URL(/*status.getBaseURL()*/ baseUrl + "/UndecidedPolling.aspx?sid=" + status.getSessionID()) //$NON-NLS-1$ + urlconnection = new URL(status.getBaseURL() + "/UndecidedPolling.aspx?sid=" + status.getSessionID()) //$NON-NLS-1$ .openConnection(); InputStream in = new BufferedInputStream(urlconnection.getInputStream()); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index a89ff972..9b1532b1 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -654,6 +654,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { param.setEmblem(new CachedFileNameEmblem(image)); } //TODO deactivated the placeholder preview + //TODO display accurate placeholder preview -> now its only standard placeholder shown //img = SignaturePlaceholderCache.getSWTPlaceholder(param); } } catch (Exception e) { diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java index 124a3aaf..6ef2d909 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/SignaturePlaceholderCache.java @@ -105,7 +105,8 @@ public class SignaturePlaceholderCache { sigEmbl.equals(sigProps.getProperty(sigEmblProp)) && sigEHsh.equals(sigProps.getProperty(sigEHshProp)) && sigNote.equals(sigProps.getProperty(sigNoteProp)) && - sigPdfA.equals(sigProps.getProperty(sigPdfAProp)) ) { + sigPdfA.equals(sigProps.getProperty(sigPdfAProp)) && + profile.equals(sigProps.getProperty(sigProfProp))) { log.debug("Placeholder cache hit"); //$NON-NLS-1$ return loadImage(fileDir, imgFileName, imgFileExt); } @@ -114,7 +115,8 @@ public class SignaturePlaceholderCache { sigEmbl + "|" + sigProps.getProperty(sigEmblProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$ sigEHsh + "|" + sigProps.getProperty(sigEHshProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$ sigNote + "|" + sigProps.getProperty(sigNoteProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$ - sigPdfA + "|" + sigProps.getProperty(sigPdfAProp) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ + sigPdfA + "|" + sigProps.getProperty(sigPdfAProp) + " - " + //$NON-NLS-1$ //$NON-NLS-2$ + profile + "|" + sigProps.getProperty(sigProfProp) + ")"); } catch (Exception e) { log.warn("Can't load signature Placeholder", e); //$NON-NLS-1$ } diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java index 6443c938..234dcc3d 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java +++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java @@ -78,7 +78,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { **/ static final Logger log = LoggerFactory .getLogger(PdfAs4SignatureParameter.class); - private String profile = null; + private String profile = Profile.getDefaultProfile(); /* (non-Javadoc) * @see at.asit.pdfover.signator.SignatureParameter#getPlaceholderDimension() -- cgit v1.2.3