diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-08-12 07:50:58 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-08-12 07:50:58 +0000 |
commit | ad806535da32c317abba16d29326e65b7c10bf13 (patch) | |
tree | e7f05f795ae9e88e7609203a7fab11f6fc270ef5 /src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java | |
parent | 19049a1a803b1732090487b5b432bea4203b8998 (diff) | |
download | pdf-as-3-ad806535da32c317abba16d29326e65b7c10bf13.tar.gz pdf-as-3-ad806535da32c317abba16d29326e65b7c10bf13.tar.bz2 pdf-as-3-ad806535da32c317abba16d29326e65b7c10bf13.zip |
more logging
new errorcode for invalid signature dictionary (232)
detect invalid signature dictionary
detect errors (invalid glyph mappings) when extracting text
remove useless certificate digest calculation
remove invocation of erroneous getCertDigest method
webapp: hotfix for NPE
adjustments for new mocca (applet) version (layout)
POM: removed deprecated maven elements
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@587 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java')
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java index 0eb417b..11f9db4 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java @@ -341,12 +341,21 @@ public class VerifyPreviewServlet extends HttpServlet writer.println("<table cellpadding=\"2\" cellspacing=\"0\" class=\"pdfaslisttable\">");
// just render useful information
- String[] rkeys = { SignatureTypes.SIG_NAME, SignatureTypes.SIG_DATE, SignatureTypes.SIG_ISSUER, SignatureTypes.SIG_NUMBER}; // SignatureTypes.REQUIRED_SIG_KEYS;
+ // FIXME: NPE in case SignatureTypes.SIG_NAME is not used (in case of friendly signer name)
+ // Problem: SignatureTypes.SIG_NAME is defined as Signer-RFC2253Name, but there is not certain
+ // key for friendly name (e.g. SIG_SUBJECT or SIG_FOO), therefore we do not know which key contains
+ // the friendly signer name
+
+ // workaround: include "SIG_SUBJECT" since it is usually used
+ String[] rkeys = { SignatureTypes.SIG_NAME, "SIG_SUBJECT", SignatureTypes.SIG_DATE, SignatureTypes.SIG_ISSUER, SignatureTypes.SIG_NUMBER}; // SignatureTypes.REQUIRED_SIG_KEYS;
for (int key_idx = 0; key_idx < rkeys.length; key_idx++)
{
String key = rkeys[key_idx];
SignatureEntry entry = signature_object.getSigEntry(key);
+ if (entry == null) {
+ continue;
+ }
String caption = entry.getCaption();
String value = entry.getValue();
if (caption == null || value == null) {
|