diff options
15 files changed, 155 insertions, 33 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/web/i18n/LanguageDecoratorMapper.java b/src/main/java/at/gv/egiz/pdfas/web/i18n/LanguageDecoratorMapper.java index c610e42..42e6b03 100644 --- a/src/main/java/at/gv/egiz/pdfas/web/i18n/LanguageDecoratorMapper.java +++ b/src/main/java/at/gv/egiz/pdfas/web/i18n/LanguageDecoratorMapper.java @@ -60,7 +60,7 @@ public class LanguageDecoratorMapper extends AbstractDecoratorMapper { session.setAttribute(LocaleParamFilter.LOCALE_SESSION_KEY, locale);
}
} else {
- LOG.debug("Locale found: " + locale);
+ LOG.trace("Locale found: " + locale);
}
return locale;
@@ -83,7 +83,7 @@ public class LanguageDecoratorMapper extends AbstractDecoratorMapper { File decFile = new File(config.getServletContext().getRealPath(path));
- LOG.debug("Looking for decorator \"" + path + "\".");
+ LOG.trace("Looking for decorator \"" + path + "\".");
if (decFile.isFile()) {
result = new DefaultDecorator(d.getName(), path, null) {
public String getInitParameter(String paramName) {
@@ -93,13 +93,13 @@ public class LanguageDecoratorMapper extends AbstractDecoratorMapper { }
if (result != null) {
- LOG.debug("Decorator found (\"" + result.getName() + "\", \"" + getFirstNotNull(new Object[] { result.getURIPath(), result.getPage(), "<n/a>"}) + "\").");
+ LOG.trace("Decorator found (\"" + result.getName() + "\", \"" + getFirstNotNull(new Object[] { result.getURIPath(), result.getPage(), "<n/a>"}) + "\").");
return result;
} else {
LOG.trace("No decorator found. Delegating to super class.");
result = super.getDecorator(request, page);
if (result != null) {
- LOG.debug("Super class returned decorator (\"" + result.getName() + "\", \"" + getFirstNotNull(new Object[] { result.getURIPath(), result.getPage(), "<n/a>"}) + "\").");
+ LOG.trace("Super class returned decorator (\"" + result.getName() + "\", \"" + getFirstNotNull(new Object[] { result.getURIPath(), result.getPage(), "<n/a>"}) + "\").");
} else {
LOG.trace("Super class did not return a decorator.");
}
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 43f7f14..78e4eec 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java @@ -25,13 +25,10 @@ import java.util.Comparator; import java.util.Date;
import java.util.List;
import java.util.Vector;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import at.gv.egiz.pdfas.algorithmSuite.AlgorithmSuiteUtil;
import at.gv.egiz.pdfas.api.analyze.NonTextObjectInfo;
import at.gv.egiz.pdfas.api.timestamp.TimeStamper;
import at.gv.egiz.pdfas.commandline.CommandlineConnectorChooser;
@@ -102,7 +99,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-snapshot";
+ public static final String PDFAS_VERSION = "3.1-snapshot (20091221)";
/**
* 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 9a52a84..1ce0b6f 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 @@ -6,6 +6,7 @@ import java.util.Iterator; import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
+import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import at.gv.egiz.pdfas.api.commons.Constants;
@@ -36,6 +37,8 @@ import com.lowagie.text.pdf.PdfString; */
public class AdobeSignatureHelper {
private static final String ADOBE_SIGN_FIELDNAME_KEY = "adobeSignFieldValue";
+
+ private static final String ADOBE_SIGN_REASONNAME_KEY = "adobeSignReasonValue";
private static final String ADOBE_SIG_ENABLED_KEY = "adobeSignEnabled";
@@ -112,6 +115,12 @@ public class AdobeSignatureHelper { // sig.setContact("contact is not visible");
// sig.setDate(new PdfDate());
+ String reason = getAdobeReasonName(so.getSignatureTypeDefinition().getType());
+ if (!StringUtils.isEmpty(reason)) {
+ sig.setReason(reason);
+ }
+
+
/* disabled in order to align adobe signature appearance for textual signatures with binary signatures
if (si != null) {
XMLGregorianCalendar c = DatatypeFactory.newInstance().newXMLGregorianCalendar(
@@ -155,7 +164,11 @@ public class AdobeSignatureHelper { }
private static String getAdobeFieldName(String sigProfile) {
- return getDefaultableConfigProperty(sigProfile, ADOBE_SIGN_FIELDNAME_KEY, "PDF-AS-Signatur");
+ return getDefaultableConfigProperty(sigProfile, ADOBE_SIGN_FIELDNAME_KEY, "PDF-AS Signatur");
+ }
+
+ private static String getAdobeReasonName(String sigProfile) {
+ return getDefaultableConfigProperty(sigProfile, ADOBE_SIGN_REASONNAME_KEY, null);
}
private static String getDefaultableConfigProperty(String sigProfile, String propName, String defaultValue) {
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java index ce46e68..8d05960 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/tools/CodingHelper.java @@ -218,6 +218,7 @@ public class CodingHelper }
catch (NoSuchAlgorithmException e)
{
+ e.printStackTrace();
return null;
}
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java index 7137741..d455179 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/FormFields.java @@ -54,6 +54,9 @@ public abstract class FormFields public static final String FIELD_RAW_DOCUMENT_TEXT = "raw_document_text";
public static final String FIELD_SIGNATURE_TYPE = "sig_type";
+
+ // tknall: PDF/A-1b enabled
+ public static final String FIELD_PDFA_ENABLED = "pdfa_enabled";
public static final String FIELD_VERIFY_WHICH = "verify_which";
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java index cdd3df1..32cfc1e 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/PdfASServletContextListener.java @@ -20,6 +20,7 @@ package at.knowcenter.wag.egov.egiz.web; import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
+import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import at.gv.egiz.pdfas.api.commons.Constants;
@@ -65,19 +66,19 @@ public class PdfASServletContextListener implements ServletContextListener String work_dir;
// search for system property
- if (sysPropWorkdir != null && sysPropWorkdir.length() > 0) {
+ if (!StringUtils.isEmpty(sysPropWorkdir)) {
work_dir = sysPropWorkdir;
logger.debug("Work-dir configuration via system property \"" + Constants.CONFIG_DIR_SYSTEM_PROPERTY + "\" = \"" + sysPropWorkdir + "\".");
// search for servlet parameter
- } else if (scWorkdir != null && scWorkdir.length() > 0){
+ } else if (!StringUtils.isEmpty(scWorkdir)){
work_dir = scWorkdir;
logger.debug("Work-dir configuration via servlet init parameter \"" + CONFIG_SERVLET_INIT_PARAMETER + "\" = \"" + scWorkdir + "\".");
// assume configuration to be located in webapp path
} else {
work_dir = sce.getServletContext().getRealPath("/");
- logger.debug("PDF-AS work-dir not explicitely given. Assuming configuration is located in webapp folder \"" + work_dir + "\".");
+ logger.info("PDF-AS work-dir not explicitely given. Assuming configuration is located in webapp folder \"" + work_dir + "\".");
}
logger.info("PDF-AS configuration location = \"" + work_dir + "\"");
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 792a3e1..f30f0fb 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 @@ -395,6 +395,10 @@ public class SignServlet extends HttpServlet download_fi = item;
continue;
}
+
+ if (FormFields.FIELD_PDFA_ENABLED.equals(item.getFieldName())) {
+ continue;
+ }
throw new ServletException("unrecognized POST data."); //$NON-NLS-1$
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/UpdateFormServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/UpdateFormServlet.java index ba5d43e..2d21545 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/UpdateFormServlet.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/UpdateFormServlet.java @@ -18,20 +18,23 @@ public class UpdateFormServlet extends HttpServlet { public static final String UPLOADFORM_SIGNATURE_TYPE_KEY = "signupload.jsp:signatureType";
public static final String UPLOADFORM_SIGNATURE_MODE_KEY = "signupload.jsp:signatureMode";
public static final String UPLOADFORM_SIGNATURE_DEVICE_KEY = "signupload.jsp:signatureKey";
+ public static final String UPLOADFORM_PDFA_KEY = "signupload.jsp:pdfaKey";
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doPost(request, response);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- String mode = request.getParameter(FormFields.FIELD_MODE);
+ String mode = request.getParameter(FormFields.FIELD_MODE);
String device = request.getParameter(FormFields.FIELD_CONNECTOR);
- String type = request.getParameter(FormFields.FIELD_SIGNATURE_TYPE);
+ String type = request.getParameter(FormFields.FIELD_SIGNATURE_TYPE);
+ String pdfa = request.getParameter(FormFields.FIELD_PDFA_ENABLED);
HttpSession session = request.getSession();
session.setAttribute(UPLOADFORM_SIGNATURE_DEVICE_KEY, device);
session.setAttribute(UPLOADFORM_SIGNATURE_MODE_KEY, mode);
session.setAttribute(UPLOADFORM_SIGNATURE_TYPE_KEY, type);
+ session.setAttribute(UPLOADFORM_PDFA_KEY, pdfa);
RequestDispatcher dispatcher = request.getRequestDispatcher("/jsp/signupload.jsp");
dispatcher.forward(request, response);
diff --git a/src/main/java/demo/ExtractNonTextualObjectsDemo.java b/src/main/java/demo/ExtractNonTextualObjectsDemo.java index d7c651f..60031f7 100644 --- a/src/main/java/demo/ExtractNonTextualObjectsDemo.java +++ b/src/main/java/demo/ExtractNonTextualObjectsDemo.java @@ -28,7 +28,7 @@ public class ExtractNonTextualObjectsDemo { public static void main(String[] args) {
if (args == null || args.length == 0) {
- System.err.println("Please provide path of file to be signed.");
+ System.err.println("Please provide path of file to be analyzed.");
System.exit(1);
}
diff --git a/src/main/resources/DefaultConfiguration.zip b/src/main/resources/DefaultConfiguration.zip Binary files differindex 1da1f47..3abe355 100644 --- a/src/main/resources/DefaultConfiguration.zip +++ b/src/main/resources/DefaultConfiguration.zip diff --git a/src/main/resources/at/gv/egiz/pdfas/web/i18n/language.properties b/src/main/resources/at/gv/egiz/pdfas/web/i18n/language.properties index b96e64c..3914cba 100644 --- a/src/main/resources/at/gv/egiz/pdfas/web/i18n/language.properties +++ b/src/main/resources/at/gv/egiz/pdfas/web/i18n/language.properties @@ -65,8 +65,10 @@ signupload.documentnotselected.preview = Please select a pdf document to be s signupload.file = PDF document
signupload.heading2 = Sign document
signupload.note = Textual signature mode is only practicable for simple documents without special structures (like tables, forms...) and graphics. Documents signed in textual mode can only be verified if the underlying certificate can be retrieved from a directory service.
+signupload.note.pdfa = Please note that using PDF/A-1b increases the size of the signed file since the font for the signature block has to be embedded.
signupload.note.prefix = Please note
signupload.noteonsigmark = The appearance of the signature mark depends on the signature type, signature mode, on the particular citizen card and on the given citizen card software.
+signupload.pdfa = use PDF/A-1b
signupload.selectfilenote = Please select the signature parameters and the pdf document to be signed with your citizen card.
signupload.signaturedevice = Signature device
signupload.signaturemode = Signature mode
diff --git a/src/main/resources/at/gv/egiz/pdfas/web/i18n/language_de.properties b/src/main/resources/at/gv/egiz/pdfas/web/i18n/language_de.properties index 5b7f309..f73ec7c 100644 --- a/src/main/resources/at/gv/egiz/pdfas/web/i18n/language_de.properties +++ b/src/main/resources/at/gv/egiz/pdfas/web/i18n/language_de.properties @@ -65,8 +65,10 @@ signupload.documentnotselected.preview = Bitte wählen Sie das zu signierende signupload.file = PDF Dokument
signupload.heading2 = Dokument Signatur erstellen
signupload.note = Der textuelle Signaturmodus ist nur für einfache Dokumente ohne Strukturierung (Tabellen, Formulare udgl.) und ohne Grafiken sinnvoll anwendbar. Textuell signierte Dokumente können nur dann geprüft werden, wenn das Zertifikat in einem Verzeichnisdienst verfügbar ist.
+signupload.note.pdfa = Bitte berücksichtigen Sie, dass die Verwendung von PDF/A-1b die Größe der signierten Datei erhöht, da die Schriftart des Signaturblocks eingebettet werden muss.
signupload.note.prefix = Bitte beachten Sie
signupload.noteonsigmark = Das Erscheinungsbild der Signaturmarke kann abhängig vom Signaturtyp, vom Signaturmodus, von der verwendeten Bürgerkarte, sowie von der verwendeten Bürgerkartenumgebung variieren.
+signupload.pdfa = PDF/A-1b verwenden
signupload.selectfilenote = Bitte wählen Sie die Signaturparameter sowie das zu signierende PDF Dokument. Dieses wird mit Ihrer Bürgerkarte signiert.
signupload.signaturedevice = Signaturgerät
signupload.signaturemode = Signaturmodus
diff --git a/src/main/webapp/jsp/signupload.jsp b/src/main/webapp/jsp/signupload.jsp index 526d2c1..010012b 100644 --- a/src/main/webapp/jsp/signupload.jsp +++ b/src/main/webapp/jsp/signupload.jsp @@ -3,6 +3,7 @@ <%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %>
<%@ page import="at.gv.egiz.pdfas.web.i18n.LanguageDecoratorMapper"%>
<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet"%>
+<%@ page import="org.apache.commons.lang.BooleanUtils"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -12,7 +13,13 @@ <head>
<%
boolean testMode = request.getContextPath().startsWith("/test-");
- boolean forceTextualForMocca = true;
+ boolean forceTextualForMocca = false;
+
+ final String SIGNATUREPROFILE_DE_nonPDFa = "SIGNATURBLOCK_DE";
+ final String SIGNATUREPROFILE_EN_nonPDFa = "SIGNATURBLOCK_EN";
+ final String SIGNATUREPROFILE_DE_PDFa = "SIGNATURBLOCK_DE_PDFA";
+ final String SIGNATUREPROFILE_EN_PDFa = "SIGNATURBLOCK_EN_PDFA";
+
%>
<title>
<%
@@ -31,8 +38,9 @@ var submitform = document.getElementById('submitform');
updateform.<%= FormFields.FIELD_SIGNATURE_TYPE %>.value = submitform.<%= FormFields.FIELD_SIGNATURE_TYPE %>.value;
- updateform.<%= FormFields.FIELD_MODE %>.value = submitform.<%= FormFields.FIELD_MODE %>.value;
- updateform.<%= FormFields.FIELD_CONNECTOR %>.value = submitform.<%= FormFields.FIELD_CONNECTOR %>.value;
+ updateform.<%= FormFields.FIELD_MODE %>.value = submitform.<%= FormFields.FIELD_MODE %>.value;
+ updateform.<%= FormFields.FIELD_CONNECTOR %>.value = submitform.<%= FormFields.FIELD_CONNECTOR %>.value;
+ updateform.<%= FormFields.FIELD_PDFA_ENABLED %>.value = (submitform.<%= FormFields.FIELD_PDFA_ENABLED %>.checked == true);
updateform.submit();
return(false);
}
@@ -73,6 +81,19 @@ mode = FormFields.VALUE_MODE_BINARY;
session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY, mode);
}
+
+ // PDF/A-1b
+ boolean pdfa = BooleanUtils.toBoolean((String) session.getAttribute(UpdateFormServlet.UPLOADFORM_PDFA_KEY));
+ String TYPE_EN;
+ String TYPE_DE;
+ if (pdfa) {
+ TYPE_EN = SIGNATUREPROFILE_EN_PDFa;
+ TYPE_DE = SIGNATUREPROFILE_DE_PDFa;
+ } else {
+ TYPE_EN = SIGNATUREPROFILE_EN_nonPDFa;
+ TYPE_DE = SIGNATUREPROFILE_DE_nonPDFa;
+ }
+
// signature type
String type = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY);
if (type == null) {
@@ -80,9 +101,23 @@ if (locale == null) {
locale = request.getLocale();
}
- type = Locale.GERMAN.getLanguage().equals(locale.getLanguage()) ? "SIGNATURBLOCK_DE" : "SIGNATURBLOCK_EN";
- session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY, type);
+ type = Locale.GERMAN.getLanguage().equals(locale.getLanguage()) ? TYPE_DE : TYPE_EN;
+ } else {
+ if (pdfa) {
+ if (SIGNATUREPROFILE_DE_nonPDFa.equals(type)) {
+ type = SIGNATUREPROFILE_DE_PDFa;
+ } else if (SIGNATUREPROFILE_EN_nonPDFa.equals(type)) {
+ type = SIGNATUREPROFILE_EN_PDFa;
+ }
+ } else {
+ if (SIGNATUREPROFILE_DE_PDFa.equals(type)) {
+ type = SIGNATUREPROFILE_DE_nonPDFa;
+ } else if (SIGNATUREPROFILE_EN_PDFa.equals(type)) {
+ type = SIGNATUREPROFILE_EN_nonPDFa;
+ }
+ }
}
+ session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY, type);
%>
</head>
@@ -102,6 +137,7 @@ <input type="hidden" name="<%= FormFields.FIELD_SIGNATURE_TYPE %>" value=""/>
<input type="hidden" name="<%= FormFields.FIELD_MODE %>" value=""/>
<input type="hidden" name="<%= FormFields.FIELD_CONNECTOR %>" value=""/>
+ <input type="hidden" name="<%= FormFields.FIELD_PDFA_ENABLED%>" value=""/>
</form>
<form name="submitform" id="submitform"
enctype="multipart/form-data"
@@ -113,10 +149,12 @@ <td align="left" nowrap="nowrap"><label><fmt:message key="signupload.signaturetype"/>:</label></td>
<td align="left">
<select class="field" name="<%= FormFields.FIELD_SIGNATURE_TYPE %>" onchange="return updateForm();">
- <option value="SIGNATURBLOCK_DE" <%= "SIGNATURBLOCK_DE".equals(type) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
- <option value="SIGNATURBLOCK_EN" <%= "SIGNATURBLOCK_EN".equals(type) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
+ <option value="<%= TYPE_DE %>" <%= TYPE_DE.equals(type) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.signaturetype.signaturblock.de"/></option>
+ <option value="<%= TYPE_EN %>" <%= TYPE_EN.equals(type) ? "selected=\"selected\"" : "" %>><fmt:message key="signupload.signaturetype.signaturblock.en"/></option>
</select>
<!-- %= // FormFields.generateTypeSelectBox() % -->
+ <span style="padding-left: 20px; 1px solid black;"></span>
+ <input type="checkbox" name="<%= FormFields.FIELD_PDFA_ENABLED %>" value="true" <%= pdfa ? "checked=\"checked\"" : "" %> onclick="return updateForm();"/> <fmt:message key="signupload.pdfa"/>
</td>
</tr>
<tr>
@@ -150,7 +188,7 @@ <td align="left"><input size="50" type="file" id="fileupload" name="<%= FormFields.FIELD_UPLOAD %>" accept="application/pdf"/></td>
</tr>
</table>
- <div class="pdfasnote"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>:</span> <fmt:message key="signupload.note"/></div>
+ <div class="pdfasnote"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>:</span> <fmt:message key="signupload.note"/> <% if (pdfa) { %><fmt:message key="signupload.note.pdfa"/><% } %></div>
<input type="hidden" name="<%= FormFields.FIELD_DOWNLOAD %>" value="<%= FormFields.VALUE_DOWNLOAD_ATTACHMENT %>"/>
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
diff --git a/src/test/java/at/gv/egiz/pdfas/algorithmSuite/AlgorithmSuiteTest.java b/src/test/java/at/gv/egiz/pdfas/algorithmSuite/AlgorithmSuiteTest.java index ca0fe3b..3ea1636 100644 --- a/src/test/java/at/gv/egiz/pdfas/algorithmSuite/AlgorithmSuiteTest.java +++ b/src/test/java/at/gv/egiz/pdfas/algorithmSuite/AlgorithmSuiteTest.java @@ -1,7 +1,5 @@ package at.gv.egiz.pdfas.algorithmSuite;
-import javax.sound.midi.SysexMessage;
-
import junit.framework.TestCase;
@@ -42,7 +40,6 @@ public class AlgorithmSuiteTest extends TestCase { assertEquals("ripemd160", as.getDataDigestMethod());
assertEquals("ripemd160", as.getPropertiesDigestMethod());
- System.err.println("?????????????????");
as = new AlgorithmSuiteObject("ecdsa-sha1:ripemd160@207c44ff", false);
assertTrue(as.isSpecified());
assertEquals("ecdsa-sha1", as.getSignatureMethod());
diff --git a/work/cfg/config.properties b/work/cfg/config.properties index cf90df8..010cd24 100644 --- a/work/cfg/config.properties +++ b/work/cfg/config.properties @@ -121,6 +121,7 @@ sig_obj.types.SIGNATURBLOCK_EN=on sig_obj.types.SIGNATURBLOCK_MINIMAL_DE=on
sig_obj.types.SIGNATURBLOCK_MINIMAL_EN=on
sig_obj.types.SIGNATURBLOCK_DE_PDFA=on
+sig_obj.types.SIGNATURBLOCK_EN_PDFA=on
sig_obj.types.INVISIBLE=on
sig_obj.types.BAIK_ARCHIV_SIGNATUR=on
sig_obj.types.BAIK_URKUNDE_SIGNATUR=on
@@ -177,6 +178,9 @@ default.adobeSignText.textual=PDF-AS #default.adobeSignFieldValue=PDF-AS Signatur
default.adobeSignFieldValue=PDF-AS Signatur
+# default name of the adobe signature reason (if enabled).
+#default.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
+
#absolute positioning
#sig_obj.PROFIL.pos=p:1;x:40.0;y:800.0;w:400.0;f:80
@@ -205,9 +209,10 @@ sig_obj.AMTSSIGNATURBLOCK_DE.key.SIG_NOTE=Hinweis sig_obj.AMTSSIGNATURBLOCK_DE.pos=f:80
sig_obj.AMTSSIGNATURBLOCK_DE.adobeSignFieldValue=PDF-AS Signatur
+sig_obj.AMTSSIGNATURBLOCK_DE.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
sig_obj.AMTSSIGNATURBLOCK_DE.value.SIG_SUBJECT=Max Mustermann
-sig_obj.AMTSSIGNATURBLOCK_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: https://www.signaturpruefung.gv.at
+sig_obj.AMTSSIGNATURBLOCK_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: http://www.signaturpruefung.gv.at
sig_obj.AMTSSIGNATURBLOCK_DE.value.SIG_LABEL=./images/signatur-logo_de.png
sig_obj.AMTSSIGNATURBLOCK_DE.value.SIG_NOTE=Dieses Dokument wurde amtssigniert. Auch ein Ausdruck dieses Dokuments hat gemäß § 20 E-Government-Gesetz die Beweiskraft einer öffentlichen Urkunde.
@@ -253,9 +258,10 @@ sig_obj.AMTSSIGNATURBLOCK_EN.key.SIG_NOTE=Note sig_obj.AMTSSIGNATURBLOCK_EN.pos=f:80
sig_obj.AMTSSIGNATURBLOCK_EN.adobeSignFieldValue=PDF-AS Signature
+sig_obj.AMTSSIGNATURBLOCK_EN.adobeSignReasonValue=Information about the verification can be found at http://www.signature-verification.gv.at
sig_obj.AMTSSIGNATURBLOCK_EN.value.SIG_SUBJECT=Max Mustermann
-sig_obj.AMTSSIGNATURBLOCK_EN.value.SIG_META=Information about the verification of the electronic signature and of the printout can be found at: https://www.signature-verification.gv.at
+sig_obj.AMTSSIGNATURBLOCK_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.AMTSSIGNATURBLOCK_EN.value.SIG_LABEL=./images/signatur-logo_en.png
sig_obj.AMTSSIGNATURBLOCK_EN.value.SIG_NOTE=This document was signed with an official signature. According to § 20 E-Government-Act a printout of this document has the probative value of an official document.
@@ -300,8 +306,9 @@ sig_obj.SIGNATURBLOCK_DE.key.SIG_META=Prüfinformation sig_obj.SIGNATURBLOCK_DE.pos=f:80
sig_obj.SIGNATURBLOCK_DE.adobeSignFieldValue=PDF-AS Signatur
+sig_obj.SIGNATURBLOCK_DE.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
-sig_obj.SIGNATURBLOCK_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: https://www.signaturpruefung.gv.at
+sig_obj.SIGNATURBLOCK_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_DE.value.SIG_LABEL=./images/signatur-logo_de.png
#---------------------- MAIN TABLE -------------------------
@@ -347,8 +354,9 @@ sig_obj.SIGNATURBLOCK_DE_PDFA.key.SIG_META=Prüfinformation sig_obj.SIGNATURBLOCK_DE_PDFA.pos=f:80
sig_obj.SIGNATURBLOCK_DE_PDFA.adobeSignFieldValue=PDF-AS Signatur
+sig_obj.SIGNATURBLOCK_DE_PDFA.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
-sig_obj.SIGNATURBLOCK_DE_PDFA.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: https://www.signaturpruefung.gv.at
+sig_obj.SIGNATURBLOCK_DE_PDFA.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: http://www.signaturpruefung.gv.at
sig_obj.SIGNATURBLOCK_DE_PDFA.value.SIG_LABEL=./images/signatur-logo_de.png
#---------------------- MAIN TABLE -------------------------
@@ -381,11 +389,12 @@ sig_obj.SIGNATURBLOCK_DE_PDFA.table.info.6=SIG_ID-cv sig_obj.SIGNATURBLOCK_MINIMAL_DE.description=minimale Standardsignatur Deutsch
sig_obj.SIGNATURBLOCK_MINIMAL_DE.key.SIG_META=Prüfinformation
-sig_obj.SIGNATURBLOCK_MINIMAL_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter:\nhttps://www.signaturpruefung.gv.at
+sig_obj.SIGNATURBLOCK_MINIMAL_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter:\nhttp://www.signaturpruefung.gv.at
sig_obj.SIGNATURBLOCK_MINIMAL_DE.value.SIG_LABEL=./images/signatur-logo_de.png
sig_obj.SIGNATURBLOCK_MINIMAL_DE.pos=w:230.0;f:80
sig_obj.SIGNATURBLOCK_MINIMAL_DE.adobeSignFieldValue=PDF-AS Signatur
+sig_obj.SIGNATURBLOCK_MINIMAL_DE.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
#---------------------- MAIN TABLE -------------------------
sig_obj.SIGNATURBLOCK_MINIMAL_DE.table.main.1=SIG_LABEL-i
@@ -410,11 +419,12 @@ sig_obj.SIGNATURBLOCK_MINIMAL_DE.table.main.Style.imagescaletofit=65.0;65.0 sig_obj.SIGNATURBLOCK_MINIMAL_EN.description=minimale Standardsignatur Englisch
sig_obj.SIGNATURBLOCK_MINIMAL_EN.key.SIG_META=Verification
-sig_obj.SIGNATURBLOCK_MINIMAL_EN.value.SIG_META=Information about the verification of the electronic signature and of the printout can be found at:\nhttps://www.signature-verification.gv.at
+sig_obj.SIGNATURBLOCK_MINIMAL_EN.value.SIG_META=Information about the verification of the electronic signature and of the printout can be found at:\nhttp://www.signature-verification.gv.at
sig_obj.SIGNATURBLOCK_MINIMAL_EN.value.SIG_LABEL=./images/signatur-logo_en.png
sig_obj.SIGNATURBLOCK_MINIMAL_EN.pos=w:230.0;f:80
sig_obj.SIGNATURBLOCK_MINIMAL_EN.adobeSignFieldValue=PDF-AS Signature
+sig_obj.SIGNATURBLOCK_MINIMAL_EN.adobeSignReasonValue=Information about the verification can be found at http://www.signature-verification.gv.at
#---------------------- MAIN TABLE -------------------------
sig_obj.SIGNATURBLOCK_MINIMAL_EN.table.main.1=SIG_LABEL-i
@@ -449,8 +459,9 @@ sig_obj.SIGNATURBLOCK_EN.key.SIG_META=Verification sig_obj.SIGNATURBLOCK_EN.pos=f:80
sig_obj.SIGNATURBLOCK_EN.adobeSignFieldValue=PDF-AS Signature
+sig_obj.SIGNATURBLOCK_EN.adobeSignReasonValue=Information about the verification can be found at http://signature-verification.gv.at
-sig_obj.SIGNATURBLOCK_EN.value.SIG_META=Information about the verification of the electronic signature and of the printout can be found at: https://www.signature-verification.gv.at
+sig_obj.SIGNATURBLOCK_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_EN.value.SIG_LABEL=./images/signatur-logo_en.png
#---------------------- MAIN TABLE -------------------------
@@ -478,6 +489,54 @@ sig_obj.SIGNATURBLOCK_EN.table.info.6=SIG_ID-cv ###################################################################################################
+# PROFIL: Signaturblock (Englisch) mit PDF/A-Support
+
+sig_obj.SIGNATURBLOCK_EN_PDFA.description=Standardsignatur Englisch (PDF/A-1b)
+
+# enable/disable PDF/A1b support for this profile
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_PDFA1B_VALID=true
+
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_VALUE=Signature Value
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_NAME=Signatory
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_DATE=Date/Time-UTC
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_ISSUER=Issuer-Certificate
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_NUMBER=Serial-No.
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_KZ=Method
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_ID=Parameter
+sig_obj.SIGNATURBLOCK_EN_PDFA.key.SIG_META=Verification
+
+sig_obj.SIGNATURBLOCK_EN_PDFA.pos=f:80
+sig_obj.SIGNATURBLOCK_EN_PDFA.adobeSignFieldValue=PDF-AS Signature
+sig_obj.SIGNATURBLOCK_EN_PDFA.adobeSignReasonValue=Information about the verification can be found at http://signature-verification.gv.at
+
+sig_obj.SIGNATURBLOCK_EN_PDFA.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_EN_PDFA.value.SIG_LABEL=./images/signatur-logo_en.png
+
+#---------------------- MAIN TABLE -------------------------
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.1=SIG_VALUE-cv
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.2=SIG_LABEL-i|TABLE-info
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.3=SIG_META-cv
+
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.ColsWidth=1 5
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.bgcolor=255 255 255
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.padding=3
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.border=0.1
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.halign=left
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.valign=middle
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.font=TTF:DejaVuSansCondensed.ttf,8
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.main.Style.valuefont=TTF:DejaVuSansMono.ttf,8
+
+#---------------------- INFO TABLE -------------------------
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.ColsWidth=1 5
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.1=SIG_NAME-cv
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.2=SIG_DATE-cv
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.3=SIG_ISSUER-cv
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.4=SIG_NUMBER-cv
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.5=SIG_KZ-cv
+sig_obj.SIGNATURBLOCK_EN_PDFA.table.info.6=SIG_ID-cv
+
+
+###################################################################################################
# PROFIL: Unsichtbarer Signaturblock
sig_obj.INVISIBLE.description=Unsichtbarer Signaturblock
@@ -495,6 +554,8 @@ sig_obj.INVISIBLE.table.main.Style.border=0 sig_obj.INVISIBLE.table.main.Style.imagescaletofit=0.0;0.0
sig_obj.INVISIBLE.adobeSignFieldValue=PDF-AS Signatur
+sig_obj.INVISIBLE.adobeSignReasonValue=Informationen zur Prüfung finden Sie unter http://www.signaturpruefung.gv.at
+
###################################################################################################
# PROFIL: BAIK Archivsignatur
|