diff options
author | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-04-08 12:40:14 +0000 |
---|---|---|
committer | tknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c> | 2010-04-08 12:40:14 +0000 |
commit | 04f5e818d61dcdc1792a2f162db14acc28a0779f (patch) | |
tree | b97f1be4fbf8f87b16b768bd32612e29eb6fb7b8 | |
parent | 11b5950be66bcc9d6f0bb28d3fc9d211bc70f4d9 (diff) | |
download | pdf-as-3-04f5e818d61dcdc1792a2f162db14acc28a0779f.tar.gz pdf-as-3-04f5e818d61dcdc1792a2f162db14acc28a0779f.tar.bz2 pdf-as-3-04f5e818d61dcdc1792a2f162db14acc28a0779f.zip |
minor updates of the web application, more logging added, default-configuration: a-trust ccs support disabled until bugfixes ccs version is available, pdf-as configuration: small signature profile added
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@581 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/api/PdfAs.java | 4 | ||||
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java | 2 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java | 2 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java | 1 | ||||
-rw-r--r-- | src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java | 4 | ||||
-rw-r--r-- | src/main/resources/DefaultConfiguration.zip | bin | 635448 -> 635825 bytes | |||
-rw-r--r-- | src/main/resources/config/pdf-as.properties | 5 | ||||
-rw-r--r-- | src/main/webapp/jsp/signupload.jsp | 10 | ||||
-rw-r--r-- | work/cfg/config.properties | 94 |
10 files changed, 114 insertions, 10 deletions
@@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
+ <packaging>war</packaging>
<groupId>knowcenter</groupId>
<artifactId>pdf-as</artifactId>
diff --git a/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java b/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java index 4a8a0e0..6e63b85 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java +++ b/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java @@ -99,7 +99,7 @@ public interface PdfAs public void reloadConfig() throws PdfAsException;
/**
- * Returns the list of information objects about the profiles available in the
+ * Returns the list of information objects about activated profiles available in the
* configuration.
*
* <p>
@@ -113,7 +113,7 @@ public interface PdfAs * </p>
*
* @return Returns the list of {@link SignatureProfile} objects with
- * information about the profiles available in the configuration.
+ * information about active profiles available in the configuration.
* @throws PdfAsException
* Thrown on error.
*
diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java index 93c0aa2..ca09871 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java @@ -37,7 +37,7 @@ public class SessionHelper Object sessionObject = session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION);
if (sessionObject == null)
{
- String msg = "The session is not found or no longer valid."; //$NON-NLS-1$
+ String msg = "Unable to find session data in session " + session.getId();
log.error(msg);
throw new SessionExpiredException(msg);
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java index 4b585fe..424aad1 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java @@ -100,7 +100,7 @@ public abstract class PdfAS * The current version of the pdf-as library. This version string is logged on every invocation
* of the api or the web application.
*/
- public static final String PDFAS_VERSION = "3.1.1-snapshot (20100316)";
+ public static final String PDFAS_VERSION = "3.1.1-snapshot (20100408)";
/**
* The key of the strict mode setting.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java index 1db1de0..aca45f0 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/AdobeSignatureHelper.java @@ -136,6 +136,7 @@ public class AdobeSignatureHelper { sig.setName(getAdobeSignText(profileId, si));
sap.setCryptoDictionary(sig);
+ sap.setCertificationLevel(PdfSignatureAppearance.NOT_CERTIFIED);
// content element is mandatory but empty
HashMap exc = new HashMap();
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java index 69b237f..4c93b73 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java @@ -280,7 +280,9 @@ public class SignServlet extends HttpServlet si.pos = pos;
// end add
- request.getSession().setAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION, si);
+ HttpSession session = request.getSession();
+ log.info("Putting signature data into session " + session.getId());
+ session.setAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION, si);
// String user_name = (String)
// request.getSession().getAttribute(SessionAttributes.ATTRIBUTE_USER_NAME);
diff --git a/src/main/resources/DefaultConfiguration.zip b/src/main/resources/DefaultConfiguration.zip Binary files differindex b9a0e77..3ee9b81 100644 --- a/src/main/resources/DefaultConfiguration.zip +++ b/src/main/resources/DefaultConfiguration.zip diff --git a/src/main/resources/config/pdf-as.properties b/src/main/resources/config/pdf-as.properties index 32bd3a5..c8d168b 100644 --- a/src/main/resources/config/pdf-as.properties +++ b/src/main/resources/config/pdf-as.properties @@ -31,8 +31,9 @@ signaturelayout.pattern.tdb=^citizen-card-environment/1\\.2 trustDeskbasic((-OSX signaturelayout.implementation.tdb=at.knowcenter.wag.egov.egiz.sig.signaturelayout.td.TrustDeskSignatureLayoutHandler
# signature layout for supported A-Trust CCS
-signaturelayout.pattern.atrust=^citizen-card-environment/1\\.2 atrustSecurityLayer/1\\.2\\.0$
-signaturelayout.implementation.atrust=at.knowcenter.wag.egov.egiz.sig.signaturelayout.atrust.ATrustSignatureLayoutHandler
+# currently disabled since A-Trust CCS has still some problems preventing the usage with PDF-AS
+#signaturelayout.pattern.atrust=^citizen-card-environment/1\\.2 atrustSecurityLayer/1\\.2\\.2$
+#signaturelayout.implementation.atrust=at.knowcenter.wag.egov.egiz.sig.signaturelayout.atrust.ATrustSignatureLayoutHandler
#############################################
diff --git a/src/main/webapp/jsp/signupload.jsp b/src/main/webapp/jsp/signupload.jsp index f6c02fe..4df2fe3 100644 --- a/src/main/webapp/jsp/signupload.jsp +++ b/src/main/webapp/jsp/signupload.jsp @@ -86,7 +86,7 @@ // signature device
String device = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY);
if (device == null) {
- device = Constants.SIGNATURE_DEVICE_BKU;
+ device = Constants.SIGNATURE_DEVICE_MOC;
session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY, device);
}
// signature mode
@@ -254,9 +254,15 @@ </td>
</tr>
</table>
+ <% if ((!freeText && (FormFields.VALUE_MODE_TEXTUAL.equals(mode))) || pdfa) { %>
<div class="pdfasnote"><span class="pdfasemphasis">
- <fmt:message key="signupload.note.prefix"/>:</span> <% if (!freeText) { %><fmt:message key="signupload.note.file"/><% } %> <fmt:message key="signupload.note"/> <% if (pdfa) { %><fmt:message key="signupload.note.pdfa"/><% } %>
+ <fmt:message key="signupload.note.prefix"/>:</span>
+ <% if ((FormFields.VALUE_MODE_TEXTUAL.equals(mode))) { %>
+ <% if (!freeText) { %><fmt:message key="signupload.note.file"/><% } %> <fmt:message key="signupload.note"/>
+ <% } // end if %>
+ <% if (pdfa) { %> <fmt:message key="signupload.note.pdfa"/><% } %>
</div>
+ <% } // end if %>
<input type="hidden" name="<%= FormFields.FIELD_DOWNLOAD %>" value="<%= FormFields.VALUE_DOWNLOAD_ATTACHMENT %>"/>
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
diff --git a/work/cfg/config.properties b/work/cfg/config.properties index 1bd86ad..594e76e 100644 --- a/work/cfg/config.properties +++ b/work/cfg/config.properties @@ -123,6 +123,8 @@ sig_obj.types.SIGNATURBLOCK_EN=on sig_obj.types.SIGNATURBLOCK_MINIMAL_DE=on
sig_obj.types.SIGNATURBLOCK_MINIMAL_EN=on
sig_obj.types.SIGNATURBLOCK_MINIMAL_TABLE_DE=on
+sig_obj.types.SIGNATURBLOCK_SMALL_DE=on
+sig_obj.types.SIGNATURBLOCK_SMALL_EN=on
#############################################
@@ -722,6 +724,98 @@ sig_obj.SIGNATURBLOCK_MINIMAL_TABLE_DE.table.main.Style.valuefont=HELVETICA,10,N sig_obj.SIGNATURBLOCK_MINIMAL_TABLE_DE.table.main.Style.imagescaletofit=65.0;65.0
+###################################################################################################
+# PROFIL: Signaturblock klein (Deutsch)
+
+sig_obj.SIGNATURBLOCK_SMALL_DE.description=Standardsignatur klein Deutsch
+
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_VALUE=Signaturwert
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_NAME=Unterzeichner
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_DATE=Datum/Zeit-UTC
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_ISSUER=Aussteller-Zertifikat
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_NUMBER=Serien-Nr.
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_KZ=Methode
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_ID=Parameter
+sig_obj.SIGNATURBLOCK_SMALL_DE.key.SIG_META=Prüfinformation
+
+sig_obj.SIGNATURBLOCK_SMALL_DE.pos=f:80;w:240
+sig_obj.SIGNATURBLOCK_SMALL_DE.adobeSignFieldValue=PDF-AS Signatur
+sig_obj.SIGNATURBLOCK_SMALL_DE.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
+sig_obj.SIGNATURBLOCK_SMALL_DE.verifyURL=http://www.signaturpruefung.gv.at
+
+sig_obj.SIGNATURBLOCK_SMALL_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: http://www.signaturpruefung.gv.at
+sig_obj.SIGNATURBLOCK_SMALL_DE.value.SIG_LABEL=./images/signatur-logo_de.png
+
+#---------------------- MAIN TABLE -------------------------
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.1=SIG_VALUE-cv
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.2=SIG_LABEL-i|TABLE-info
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.3=SIG_META-cv
+
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.ColsWidth=1 5
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.bgcolor=255 255 255
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.padding=3
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.border=0.1
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.halign=left
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.valign=middle
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.font=HELVETICA,5,NORMAL
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.main.Style.valuefont=COURIER,5,NORMAL
+
+#---------------------- INFO TABLE -------------------------
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.ColsWidth=1 3.1
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.1=SIG_NAME-cv
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.2=SIG_DATE-cv
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.3=SIG_ISSUER-cv
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.4=SIG_NUMBER-cv
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.5=SIG_KZ-cv
+sig_obj.SIGNATURBLOCK_SMALL_DE.table.info.6=SIG_ID-cv
+
+
+
+###################################################################################################
+# PROFIL: Signaturblock Small (Englisch)
+
+sig_obj.SIGNATURBLOCK_SMALL_EN.description=Standardsignatur klein Englisch
+
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_VALUE=Signature Value
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_NAME=Signatory
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_DATE=Date/Time-UTC
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_ISSUER=Issuer-Certificate
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_NUMBER=Serial-No.
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_KZ=Method
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_ID=Parameter
+sig_obj.SIGNATURBLOCK_SMALL_EN.key.SIG_META=Verification
+
+sig_obj.SIGNATURBLOCK_SMALL_EN.pos=f:80;w:240
+sig_obj.SIGNATURBLOCK_SMALL_EN.adobeSignFieldValue=PDF-AS Signature
+sig_obj.SIGNATURBLOCK_SMALL_EN.adobeSignReasonValue=Information about the verification can be found at http://www.signature-verification.gv.at
+sig_obj.SIGNATURBLOCK_SMALL_EN.verifyURL=http://www.signature-verification.gv.at
+
+sig_obj.SIGNATURBLOCK_SMALL_EN.value.SIG_META=Information about the verification of the electronic signature and of the printout can be found at: http://www.signature-verification.gv.at
+sig_obj.SIGNATURBLOCK_SMALL_EN.value.SIG_LABEL=./images/signatur-logo_en.png
+
+#---------------------- MAIN TABLE -------------------------
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.1=SIG_VALUE-cv
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.2=SIG_LABEL-i|TABLE-info
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.3=SIG_META-cv
+
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.ColsWidth=1 5
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.bgcolor=255 255 255
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.padding=3
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.border=0.1
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.halign=left
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.valign=middle
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.font=HELVETICA,5,NORMAL
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.main.Style.valuefont=COURIER,5,NORMAL
+
+#---------------------- INFO TABLE -------------------------
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.ColsWidth=1 4
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.1=SIG_NAME-cv
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.2=SIG_DATE-cv
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.3=SIG_ISSUER-cv
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.4=SIG_NUMBER-cv
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.5=SIG_KZ-cv
+sig_obj.SIGNATURBLOCK_SMALL_EN.table.info.6=SIG_ID-cv
+
#############################################
|