aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-01-14 11:39:31 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-01-14 11:39:31 +0000
commit95f6c6fe321d33dc8fa9e18c7d96bd9b21ef10cc (patch)
tree98faaac7ffd2a5f11130c1412a6d2b96fa45f09d
parent392c2cd13d0fcd24bce22987f454e529637307fc (diff)
downloadpdf-as-3-95f6c6fe321d33dc8fa9e18c7d96bd9b21ef10cc.tar.gz
pdf-as-3-95f6c6fe321d33dc8fa9e18c7d96bd9b21ef10cc.tar.bz2
pdf-as-3-95f6c6fe321d33dc8fa9e18c7d96bd9b21ef10cc.zip
Switching to itext-2.1.5-rev3628.
itext library: minor adjustments for pdf-as Adding new error code (103) for invalid pdfa/1b font configuration. Minor updates for PDF/A support. Support for local MOCCA CCS added. Multi language for web application. Encoding issue for web application fixed by implementing an EncodingFilter. Dynamic sign upload form implemented. Order of input fields for dynamic upload form changed. MOCCA logo added to sign upload form. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@319 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
-rw-r--r--pom.xml14
-rw-r--r--src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java2
-rw-r--r--src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java1
-rw-r--r--src/main/java/at/gv/egiz/pdfas/web/filter/EncodingFilter.java123
-rw-r--r--src/main/java/at/gv/egiz/pdfas/web/i18n/LanguageDecoratorMapper.java64
-rw-r--r--src/main/java/at/gv/egiz/pdfas/web/i18n/LocaleParamFilter.java96
-rw-r--r--src/main/java/at/gv/egiz/pdfas/web/i18n/SetLanguageServlet.java59
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java58
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java5
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java3
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUPostConnection.java11
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java13
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java9
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java139
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java194
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java17
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java4
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/SignServlet.java7
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/UpdateFormServlet.java41
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/VerifyPreviewServlet.java5
-rw-r--r--src/main/java/at/knowcenter/wag/exactparser/parsing/PDFUtils.java3
-rw-r--r--src/main/resources/DefaultConfiguration.zipbin181257 -> 648596 bytes
-rw-r--r--src/main/resources/at/gv/egiz/pdfas/web/i18n/language.properties96
-rw-r--r--src/main/resources/at/gv/egiz/pdfas/web/i18n/language_de.properties96
-rw-r--r--src/main/webapp/META-INF/context.xml2
-rw-r--r--src/main/webapp/WEB-INF/decorators.xml3
-rw-r--r--src/main/webapp/WEB-INF/web.xml40
-rw-r--r--src/main/webapp/images/button-search.jpgbin0 -> 778 bytes
-rw-r--r--src/main/webapp/images/chiperling.jpgbin0 -> 22511 bytes
-rw-r--r--src/main/webapp/images/menu-divider.jpgbin0 -> 485 bytes
-rw-r--r--src/main/webapp/images/signatur-logo_en-100.pngbin0 -> 10037 bytes
-rw-r--r--src/main/webapp/images/signatur-logo_en.pngbin0 -> 60055 bytes
-rw-r--r--src/main/webapp/jsp/SIGNATURBLOCK.jsp110
-rw-r--r--src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp61
-rw-r--r--src/main/webapp/jsp/dataok.jsp15
-rw-r--r--src/main/webapp/jsp/download.jsp16
-rw-r--r--src/main/webapp/jsp/error.jsp23
-rw-r--r--src/main/webapp/jsp/error_verify.jsp12
-rw-r--r--src/main/webapp/jsp/language.jsp9
-rw-r--r--src/main/webapp/jsp/null_request_page.jsp52
-rw-r--r--src/main/webapp/jsp/please_wait.jsp16
-rw-r--r--src/main/webapp/jsp/results.jsp28
-rw-r--r--src/main/webapp/jsp/signpreview.jsp26
-rw-r--r--src/main/webapp/jsp/signupload.jsp174
-rw-r--r--src/main/webapp/jsp/verifylist.jsp17
-rw-r--r--src/main/webapp/jsp/verifypreview.jsp17
-rw-r--r--src/main/webapp/jsp/verifyupload.jsp23
-rw-r--r--src/main/webapp/sitemesh/buergerkarte/pdf-as-template-de.jsp140
-rw-r--r--src/main/webapp/sitemesh/buergerkarte/pdf-as-template.jsp160
-rw-r--r--src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template-de.jsp140
-rw-r--r--src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template.jsp160
-rw-r--r--src/main/webapp/sitemesh/standalone.jsp4
-rw-r--r--src/site/changes.xml16
-rw-r--r--work/cfg/config.properties66
-rw-r--r--work/cfg/help_text.properties3
-rw-r--r--work/cfg/log4j.properties10
57 files changed, 1930 insertions, 475 deletions
diff --git a/pom.xml b/pom.xml
index fa6c239..208a894 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,12 +4,12 @@
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>
<name>PDF-AS</name>
- <version>3.0.8-20081119</version>
+ <version>3.0.8-20090113</version>
<!-- don't forget to set the version string at.knowcenter.wag.egov.egiz.PdfAS.PDFAS_VERSION accordingly -->
<description>Amtssignatur fuer elektronische Aktenfuehrung</description>
@@ -63,6 +63,16 @@
</developer>
<developer>
+ <id>gfliess</id>
+ <name>Gerhard Fliess</name>
+ <organization>XiCrypt</organization>
+ <roles>
+ <role>developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+
+ <developer>
<id>amavriqi</id>
<name>Arian Mavriqi</name>
<email>amavriqi@iicm.edu</email>
diff --git a/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java b/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
index 7a8283e..904bd9d 100644
--- a/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
+++ b/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
@@ -71,7 +71,7 @@ public class CommandlineConnectorChooser
if (sig_kz == null)
{
- log.debug("sig_kz is null -> chose an old enveloped base64 connector"); //$NON-NLS-1$
+ log.debug("sig_kz is null -> choosing an old enveloped base64 connector"); //$NON-NLS-1$
return chooseEnvelopingBase64ConnectorOld(connectorType);
}
diff --git a/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java b/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
index ab8914c..f6b5602 100644
--- a/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
+++ b/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
@@ -19,6 +19,7 @@ public final class ErrorCode
public static final int SETTING_NOT_FOUND = 100;
public static final int SETTINGS_EXCEPTION = 101;
public static final int KZ_SETTING_NOT_FOUND = 102;
+ public static final int NO_EMBEDABLE_TTF_CONFIGURED_FOR_PDFA = 103;
public static final int DOCUMENT_CANNOT_BE_READ = 201;
public static final int TEXT_EXTRACTION_EXCEPTION = 202;
diff --git a/src/main/java/at/gv/egiz/pdfas/web/filter/EncodingFilter.java b/src/main/java/at/gv/egiz/pdfas/web/filter/EncodingFilter.java
new file mode 100644
index 0000000..5267918
--- /dev/null
+++ b/src/main/java/at/gv/egiz/pdfas/web/filter/EncodingFilter.java
@@ -0,0 +1,123 @@
+package at.gv.egiz.pdfas.web.filter;
+
+import java.io.IOException;
+import java.nio.charset.Charset;
+
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.builder.ToStringBuilder;
+import org.apache.log4j.Logger;
+
+/**
+ * @author <a href="mailto:thomas.knall@iaik.tugraz.at">Thomas Knall</a>
+ */
+public class EncodingFilter implements javax.servlet.Filter {
+
+ private static final String SERVLET_INIT_PARAM_ENCODING = "encoding";
+
+ private static final String SERVLET_INIT_PARAM_SET_REQUEST_ENCODING = "setRequestEncoding";
+ private static final String SERVLET_INIT_PARAM_FORCE_REQUEST_ENCODING = "forceRequestEncoding";
+
+ private static final String SERVLET_INIT_PARAM_SET_RESPONSE_ENCODING = "setResponseEncoding";
+ private static final String SERVLET_INIT_PARAM_FORCE_RESPONSE_ENCODING = "forceResponseEncoding";
+
+ private static final boolean DEFAULT_SET_REQUEST_ENCODING_VALUE = true;
+ private static final boolean DEFAULT_FORCE_REQUEST_ENCODING_VALUE = true;
+ private static final boolean DEFAULT_SET_RESPONSE_ENCODING_VALUE = false;
+ private static final boolean DEFAULT_FORCE_RESPONSE_ENCODING_VALUE = false;
+
+ private Logger log = Logger.getLogger(getClass().getName());
+
+ private String encoding = null;
+
+ private boolean setRequestEncoding;
+ private boolean forceRequestEncoding;
+
+ private boolean setResponseEncoding;
+ private boolean forceResponseEncoding;
+
+ private boolean enabled = false;
+
+ private boolean parseBooleanInitParameter(final FilterConfig filterConfig, String parameterName, boolean defaultValue) {
+ String paramValue = filterConfig.getInitParameter(parameterName);
+ if (paramValue == null) {
+ return defaultValue;
+ }
+ paramValue = paramValue.trim();
+ if (paramValue.equalsIgnoreCase("true")) {
+ return true;
+ } else if (paramValue.equalsIgnoreCase("false")){
+ return false;
+ } else {
+ log.warn("Unknown value \"" + paramValue + "\" for init parameter \"" + parameterName + "\" detected. Should be \"true\" or \"false\". Using default value \"" + defaultValue + "\".");
+ return defaultValue;
+ }
+ }
+
+ public void init(final FilterConfig filterConfig) throws ServletException {
+ log.debug("Initializing encoding filter (" + getClass().getName() + ").");
+
+ // mandatory parameter encoding
+ String desiredEncoding = filterConfig.getInitParameter(SERVLET_INIT_PARAM_ENCODING);
+ if (StringUtils.isEmpty(desiredEncoding)) {
+ log.warn("Unable to initialize encoding filter (" + getClass().getName() + "). Init parameter \"" + SERVLET_INIT_PARAM_ENCODING + "\" empty or not supplied.");
+ } else if (!Charset.isSupported(desiredEncoding)) {
+ log.warn("Unable to initialize encoding filter (" + getClass().getName() + "). Encoding \"" + desiredEncoding + "\" is not supported.");
+ } else {
+ this.encoding = desiredEncoding;
+ this.enabled = true;
+ this.setRequestEncoding = this.parseBooleanInitParameter(filterConfig, SERVLET_INIT_PARAM_SET_REQUEST_ENCODING, DEFAULT_SET_REQUEST_ENCODING_VALUE);
+ this.forceRequestEncoding = this.parseBooleanInitParameter(filterConfig, SERVLET_INIT_PARAM_FORCE_REQUEST_ENCODING, DEFAULT_FORCE_REQUEST_ENCODING_VALUE);
+ this.setResponseEncoding = this.parseBooleanInitParameter(filterConfig, SERVLET_INIT_PARAM_SET_RESPONSE_ENCODING, DEFAULT_SET_RESPONSE_ENCODING_VALUE);
+ this.forceResponseEncoding = this.parseBooleanInitParameter(filterConfig, SERVLET_INIT_PARAM_FORCE_RESPONSE_ENCODING, DEFAULT_FORCE_RESPONSE_ENCODING_VALUE);
+ log.debug("Encoding filter \"" + getClass().getName() + "\" configured: " + this.toString(true));
+
+ }
+ }
+
+ public String toString(boolean verbose) {
+ if (verbose) {
+ return new ToStringBuilder(this)
+ .append(SERVLET_INIT_PARAM_ENCODING, this.encoding)
+ .append(SERVLET_INIT_PARAM_SET_REQUEST_ENCODING, this.setRequestEncoding)
+ .append(SERVLET_INIT_PARAM_FORCE_REQUEST_ENCODING, this.forceRequestEncoding)
+ .append(SERVLET_INIT_PARAM_SET_RESPONSE_ENCODING, this.setResponseEncoding)
+ .append(SERVLET_INIT_PARAM_FORCE_RESPONSE_ENCODING, this.forceResponseEncoding)
+ .toString();
+ } else {
+ return super.toString();
+ }
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, final FilterChain filterChain) throws IOException, ServletException {
+ if (this.enabled) {
+ if (this.setRequestEncoding) {
+ if (this.forceRequestEncoding) {
+ log.trace("Forcing request encoding \"" + this.encoding + "\".");
+ request.setCharacterEncoding(this.encoding);
+ } else if (request.getCharacterEncoding() == null) {
+ log.trace("Request character encoding not set. Setting to \"" + this.encoding + "\".");
+ request.setCharacterEncoding("UTF8");
+ }
+ }
+ if (this.setResponseEncoding) {
+ if (this.forceResponseEncoding) {
+ log.trace("Forcing response encoding \"" + this.encoding + "\".");
+ response.setCharacterEncoding(this.encoding);
+ } else if (response.getCharacterEncoding() == null) {
+ log.trace("Response character encoding not set. Setting to \"" + this.encoding + "\".");
+ response.setCharacterEncoding("UTF8");
+ }
+ }
+ }
+ filterChain.doFilter(request, response);
+ }
+
+ public void destroy() {
+ }
+}
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 1db7e3b..c610e42 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
@@ -18,9 +18,10 @@ import com.opensymphony.module.sitemesh.mapper.DefaultDecorator;
public class LanguageDecoratorMapper extends AbstractDecoratorMapper {
- public static final String LOCALE_SESSION_KEY = "at.gv.egiz.pdfas.web.i18n:currentLocale";
- private Logger log = Logger.getLogger(LanguageDecoratorMapper.class);
+ private String decoratorParameter = null;
+
+ private static final Logger LOG = Logger.getLogger(LanguageDecoratorMapper.class);
public void init(Config config, Properties properties, DecoratorMapper parent) throws InstantiationException {
super.init(config, properties, parent);
@@ -37,29 +38,42 @@ public class LanguageDecoratorMapper extends AbstractDecoratorMapper {
}
return null;
}
+
+ public static Locale getLocale(HttpServletRequest request, String decoratorParameter) {
+ Locale locale = null;
+ HttpSession session = request.getSession();
+
+ LOG.trace("Looking for locale in session (ID=" + session.getId() + ").");
+ locale = (Locale) session.getAttribute(LocaleParamFilter.LOCALE_SESSION_KEY);
+ if (locale == null) {
+ LOG.debug("Unable to find locale in session. Trying to create new locale based on Accept-Language header entry.");
+ String acceptLanguage = request.getHeader("Accept-Language");
+ if (acceptLanguage != null) {
+ LOG.trace("Accept-Language header entry: " + acceptLanguage);
+ } else {
+ LOG.trace("No header entry found.");
+ }
+ if (acceptLanguage != null && acceptLanguage.length() >= 2) {
+ locale = new Locale(acceptLanguage.substring(0, 2));
+ LOG.debug("New Locale created: " + locale);
+ LOG.trace("Setting language to " + locale.getDisplayLanguage() + ".");
+ session.setAttribute(LocaleParamFilter.LOCALE_SESSION_KEY, locale);
+ }
+ } else {
+ LOG.debug("Locale found: " + locale);
+ }
+
+ return locale;
+ }
public Decorator getDecorator(HttpServletRequest request, Page page) {
+ LOG.trace("SiteMesh language resource decorator mapper invoked.");
+
try {
Decorator result = null;
final Decorator d = super.getDecorator(request, page);
- HttpSession session = request.getSession();
- log.trace("Looking for Locale in session.");
- Locale locale = (Locale) session.getAttribute(LOCALE_SESSION_KEY);
- if (locale == null) {
- log.debug("Unable to find Locale in session. Creating new Locale based on Accept-Language header entry.");
- String acceptLanguage = request.getHeader("Accept-Language");
- if (acceptLanguage != null) {
- log.trace("Accept-Language header entry: " + acceptLanguage);
- } else {
- log.trace("No header entry found.");
- }
- if (acceptLanguage != null && acceptLanguage.length() >= 2) {
- locale = new Locale(acceptLanguage.substring(0, 2));
- log.debug("New Locale created: " + locale);
- }
- } else {
- log.debug("Locale found: " + locale);
- }
+ Locale locale = getLocale(request, this.decoratorParameter);
+
String path;
if (locale != null) {
path = modifyPath(d.getPage(), locale.getLanguage());
@@ -69,7 +83,7 @@ public class LanguageDecoratorMapper extends AbstractDecoratorMapper {
File decFile = new File(config.getServletContext().getRealPath(path));
- log.debug("Looking for decorator \"" + path + "\".");
+ LOG.debug("Looking for decorator \"" + path + "\".");
if (decFile.isFile()) {
result = new DefaultDecorator(d.getName(), path, null) {
public String getInitParameter(String paramName) {
@@ -79,15 +93,15 @@ public class LanguageDecoratorMapper extends AbstractDecoratorMapper {
}
if (result != null) {
- log.debug("Decorator found (\"" + result.getName() + "\", \"" + getFirstNotNull(new Object[] { result.getURIPath(), result.getPage(), "<n/a>"}) + "\").");
+ LOG.debug("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.");
+ 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.debug("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.");
+ LOG.trace("Super class did not return a decorator.");
}
return result;
}
diff --git a/src/main/java/at/gv/egiz/pdfas/web/i18n/LocaleParamFilter.java b/src/main/java/at/gv/egiz/pdfas/web/i18n/LocaleParamFilter.java
new file mode 100644
index 0000000..598b23b
--- /dev/null
+++ b/src/main/java/at/gv/egiz/pdfas/web/i18n/LocaleParamFilter.java
@@ -0,0 +1,96 @@
+package at.gv.egiz.pdfas.web.i18n;
+
+import java.io.IOException;
+import java.util.Locale;
+import java.util.StringTokenizer;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.LocaleUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+
+public class LocaleParamFilter implements Filter {
+
+ private static final Logger LOG = Logger.getLogger(LocaleParamFilter.class);
+ public static final String LOCALE_SESSION_KEY = "at.gv.egiz.pdfas.web.i18n:currentLocale";
+ public static final String LOCALE_PARAM_KEY = "locale";
+
+ public void destroy() {
+ }
+
+ public static String normalizeLocaleString(String localeString) {
+ if (localeString == null) {
+ return null;
+ }
+ int jsessionIdIndex = localeString.toLowerCase().indexOf(";jsessionid");
+ if (jsessionIdIndex != -1) {
+ localeString = localeString.substring(0, jsessionIdIndex);
+ }
+ StringTokenizer tokenizer = new StringTokenizer(localeString, "_", false);
+ StringBuffer buffer = new StringBuffer();
+ int index = 0;
+ while (tokenizer.hasMoreTokens()) {
+ String token = tokenizer.nextToken();
+ switch (++index) {
+ case 1:
+ buffer.append(token.toLowerCase());
+ break;
+ case 2:
+ buffer.append(token.toUpperCase());
+ break;
+ default:
+ buffer.append(token);
+ break;
+ }
+ if (tokenizer.hasMoreTokens()) {
+ buffer.append("_");
+ }
+ }
+ return buffer.toString();
+ }
+
+ public static Locale getLocale(HttpServletRequest request) {
+ Locale locale = null;
+ HttpSession session = request.getSession();
+
+ LOG.trace("Looking for locale parameter \"" + LOCALE_PARAM_KEY + "\".");
+ String language = request.getParameter(LOCALE_PARAM_KEY);
+ if (!StringUtils.isEmpty(language)) {
+ LOG.debug("Locale parameter \"" + language + "\" found.");
+ String code = normalizeLocaleString(language.trim());
+ LOG.debug("Normalizing locale -> " + code);
+ try {
+ locale = LocaleUtils.toLocale(code);
+ LOG.info("Setting locale flag in session (ID=" + session.getId() + ") to \"" + locale.toString() + "\".");
+ session.setAttribute(LOCALE_SESSION_KEY, locale);
+ } catch (IllegalArgumentException e) {
+ LOG.error("Locale \"" + code + "\" is not valid. Flag will not be set.");
+ }
+ } else {
+ LOG.trace("No locale parameter found.");
+ }
+
+ return locale;
+ }
+
+ public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
+ HttpServletRequest request = (HttpServletRequest) servletRequest;
+
+ LOG.trace("LocaleParamFilter invoked.");
+ getLocale(request);
+
+ filterChain.doFilter(servletRequest, servletResponse);
+ }
+
+ public void init(FilterConfig filterConfig) throws ServletException {
+ }
+
+}
diff --git a/src/main/java/at/gv/egiz/pdfas/web/i18n/SetLanguageServlet.java b/src/main/java/at/gv/egiz/pdfas/web/i18n/SetLanguageServlet.java
deleted file mode 100644
index 582f765..0000000
--- a/src/main/java/at/gv/egiz/pdfas/web/i18n/SetLanguageServlet.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package at.gv.egiz.pdfas.web.i18n;
-
-import java.io.IOException;
-import java.util.Locale;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-
-public class SetLanguageServlet extends HttpServlet {
-
- private static final long serialVersionUID = 1L;
-
- public static final String LANGUAGE_PARAMETER = "code";
- private Logger log = Logger.getLogger(LanguageDecoratorMapper.class);
-
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- this.doPost(request, response);
- }
-
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-
- HttpSession session = request.getSession();
-
- // check manual language override (should be two-letter ISO-639 code)
- Locale currentManualSetLanguage = (Locale) session.getAttribute(LanguageDecoratorMapper.LOCALE_SESSION_KEY);
- String language = request.getParameter(LANGUAGE_PARAMETER);
- if (!StringUtils.isEmpty(language)) {
- String code = language.trim().toLowerCase();
- if (!ArrayUtils.contains(Locale.getISOLanguages(), code)) {
- log.error("Manually set language code \"" + code + "\" is not a valid ISO 639 language. Do not switch language.");
- } else {
- currentManualSetLanguage = new Locale(code);
- log.info("Switching language to " + currentManualSetLanguage.getDisplayLanguage() + ".");
- session.setAttribute(LanguageDecoratorMapper.LOCALE_SESSION_KEY, currentManualSetLanguage);
- }
- }
-
-// if (currentManualSetLanguage != null) {
-// log.info("Forcing language " + currentManualSetLanguage.getDisplayLanguage() + ".");
-// super.getServletContext().setAttribute(LanguageDecoratorMapper.LOCALE_SESSION_KEY, currentManualSetLanguage);
-// }
-
-// response.sendRedirect(response.encodeRedirectURL(request.getContextPath() + "/"));
- RequestDispatcher rd = request.getRequestDispatcher("/");
- rd.forward(request, response);
-
- }
-
-
-
-}
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 2ffc7b2..3824a98 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
@@ -96,7 +96,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.0.8-20081119";
+ public static final String PDFAS_VERSION = "3.0.8-20090113";
/**
* The key of the strict mode setting.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java b/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java
index d781577..1a41982 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/exceptions/SettingsException.java
@@ -29,28 +29,38 @@ import at.gv.egiz.pdfas.exceptions.ErrorCode;
*
* @author wprinz
*/
-public class SettingsException extends PresentableException
-{
-
- /**
- * SVUID.
- */
- private static final long serialVersionUID = -99979541706943372L;
-
- /**
- * @param message
- */
- public SettingsException(String message)
- {
- super(ErrorCode.SETTINGS_EXCEPTION, message);
- }
-
- /**
- * @param message
- * @param cause
- */
- public SettingsException(String message, Throwable cause)
- {
- super(ErrorCode.SETTINGS_EXCEPTION, message, cause);
- }
+public class SettingsException extends PresentableException {
+
+ /**
+ * SVUID.
+ */
+ private static final long serialVersionUID = -99979541706943372L;
+
+ /**
+ * @param message
+ */
+ public SettingsException(String message) {
+ super(ErrorCode.SETTINGS_EXCEPTION, message);
+ }
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public SettingsException(String message, Throwable cause) {
+ super(ErrorCode.SETTINGS_EXCEPTION, message, cause);
+ }
+
+ public SettingsException(int errorCode, String message, Throwable cause) {
+ super(errorCode, message, cause);
+ }
+
+ public SettingsException(int errorCode, String message) {
+ super(errorCode, message);
+ }
+
+ public SettingsException(int errorCode, Throwable cause) {
+ super(errorCode, cause);
+ }
+
}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
index b1b1a5a..0467bad 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/pdf/PDFSignatureObjectIText.java
@@ -359,8 +359,9 @@ public class PDFSignatureObjectIText implements PDFSignatureObject
}
else
{
- if(pdfaValid)
- throw new PDFDocumentException(0,"PDF/A modus requires an embedable true type font");
+ if (pdfaValid) {
+ throw new PDFDocumentException(ErrorCode.NO_EMBEDABLE_TTF_CONFIGURED_FOR_PDFA, "PDF/A modus requires an embedable true type font");
+ }
cell_font = getCellFont(font_string);
}
Phrase text_phrase = new Phrase(text, cell_font);
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java
index 9253955..cec8d6f 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUHelper.java
@@ -156,6 +156,9 @@ public final class BKUHelper
public static SignSignatureObject parseCreateXMLResponse(String xmlResponse,
IdFormatter id_formatter) throws ConnectorException
{
+ if (log.isDebugEnabled()) {
+ log.debug("xmlResponse = " + xmlResponse);
+ }
Pattern sig_val_p_s = Pattern.compile("<[\\w]*:?SignatureValue>"); //$NON-NLS-1$
Pattern sig_val_p_e = Pattern.compile("</[\\w]*:?SignatureValue>"); //$NON-NLS-1$
Pattern iss_nam_p_s = Pattern.compile("<[\\w]*:?X509IssuerName>"); //$NON-NLS-1$
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUPostConnection.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUPostConnection.java
index 1a720d8..b582715 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUPostConnection.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUPostConnection.java
@@ -41,6 +41,11 @@ public final class BKUPostConnection
public static final String BKU_SERVER_HEADER_KEY = "BKU-Server-Header"; //$NON-NLS-1$
/**
+ * The response Properties key that identifies the BKU User-Agent header.
+ */
+ public static final String BKU_USER_AGENT_HEADER_KEY = "BKU-User-Agent-Header"; //$NON-NLS-1$
+
+ /**
* The log.
*/
private static Log log = LogFactory.getLog(BKUPostConnection.class);
@@ -119,7 +124,11 @@ public final class BKUPostConnection
}
}
Header server_header = post_method.getResponseHeader("Server"); //$NON-NLS-1$
- response_properties.setProperty(BKU_SERVER_HEADER_KEY, server_header.getValue());
+ if (server_header != null) {
+ response_properties.setProperty(BKU_SERVER_HEADER_KEY, server_header.getValue());
+ } else {
+ log.warn("BKU response header \"Server\" is empty.");
+ }
log.debug(post_method.getResponseCharSet());
if (!post_method.getResponseCharSet().equals("UTF-8")) //$NON-NLS-1$
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java
index 5dbc0a6..d10afc6 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java
@@ -21,7 +21,9 @@ import at.knowcenter.wag.egov.egiz.sig.connectors.Connector;
import at.knowcenter.wag.egov.egiz.sig.connectors.LocalConnector;
import at.knowcenter.wag.egov.egiz.sig.connectors.TemplateReplaces;
import at.knowcenter.wag.egov.egiz.sig.connectors.moa.DetachedLocRefMOAConnector;
+import at.knowcenter.wag.egov.egiz.sig.connectors.mocca.MOCCAHelper;
import at.knowcenter.wag.egov.egiz.sig.sigid.DetachedIdFormatter;
+import at.knowcenter.wag.egov.egiz.sig.sigid.DetachedMOCIdFormatter;
import at.knowcenter.wag.egov.egiz.sig.sigkz.SigKZIDHelper;
import at.knowcenter.wag.egov.egiz.tools.CodingHelper;
import at.knowcenter.wag.egov.egiz.tools.FileHelper;
@@ -123,10 +125,19 @@ public class DetachedBKUConnector implements Connector, LocalConnector
log.debug("analyzeSignResponse:"); //$NON-NLS-1$
String response_string = response_properties.getProperty(BKUPostConnection.RESPONSE_STRING_KEY);
+ String bkuServerHeader = response_properties.getProperty(BKUPostConnection.BKU_SERVER_HEADER_KEY);
+ String bkuUserAgentHeader = response_properties.getProperty(BKUPostConnection.BKU_USER_AGENT_HEADER_KEY);
BKUHelper.checkResponseForError(response_string);
- SignSignatureObject so = BKUHelper.parseCreateXMLResponse(response_string, new DetachedIdFormatter());
+ SignSignatureObject so;
+ if (MOCCAHelper.isMOCCACCEId(bkuServerHeader == null ? bkuUserAgentHeader : bkuServerHeader)) {
+ log.debug("Evaluating response as MOCCA response.");
+ so = MOCCAHelper.parseCreateXMLResponse(response_string, new DetachedMOCIdFormatter());
+ } else {
+ so = BKUHelper.parseCreateXMLResponse(response_string, new DetachedIdFormatter());
+ }
+
so.response_properties = response_properties;
log.debug("analyzeSignResponse finished."); //$NON-NLS-1$
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
index 44a7c38..b45303d 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java
@@ -4,15 +4,7 @@
package at.knowcenter.wag.egov.egiz.sig.connectors.moa;
import java.security.cert.X509Certificate;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
import java.util.Properties;
-import java.util.SimpleTimeZone;
-import java.util.TimeZone;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -22,7 +14,6 @@ import at.gv.egiz.pdfas.framework.ConnectorParameters;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
-import at.knowcenter.wag.egov.egiz.exceptions.SignatureException;
import at.knowcenter.wag.egov.egiz.sig.SignatureData;
import at.knowcenter.wag.egov.egiz.sig.SignatureResponse;
import at.knowcenter.wag.egov.egiz.sig.connectors.Connector;
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java
index 8ae6d5f..fcfe006 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/LocRefDetachedMOCCAConnector.java
@@ -1,10 +1,5 @@
package at.knowcenter.wag.egov.egiz.sig.connectors.mocca;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.Properties;
import java.util.regex.Matcher;
@@ -15,16 +10,11 @@ import org.apache.commons.logging.LogFactory;
import at.gv.egiz.pdfas.exceptions.ErrorCode;
import at.gv.egiz.pdfas.framework.ConnectorParameters;
-import at.gv.egiz.pdfas.web.helper.SigningTimeHelper;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
-import at.knowcenter.wag.egov.egiz.exceptions.PresentableException;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
-import at.knowcenter.wag.egov.egiz.exceptions.SignatureException;
import at.knowcenter.wag.egov.egiz.sig.SignatureData;
-import at.knowcenter.wag.egov.egiz.sig.SignatureObject;
import at.knowcenter.wag.egov.egiz.sig.SignatureResponse;
-import at.knowcenter.wag.egov.egiz.sig.X509Cert;
import at.knowcenter.wag.egov.egiz.sig.connectors.Connector;
import at.knowcenter.wag.egov.egiz.sig.connectors.LocalConnector;
import at.knowcenter.wag.egov.egiz.sig.connectors.TemplateReplaces;
@@ -32,7 +22,6 @@ import at.knowcenter.wag.egov.egiz.sig.connectors.bku.BKUHelper;
import at.knowcenter.wag.egov.egiz.sig.connectors.bku.BKUPostConnection;
import at.knowcenter.wag.egov.egiz.sig.connectors.bku.SignSignatureObject;
import at.knowcenter.wag.egov.egiz.sig.sigid.DetachedMOCIdFormatter;
-import at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter;
import at.knowcenter.wag.egov.egiz.tools.CodingHelper;
import at.knowcenter.wag.egov.egiz.tools.FileHelper;
@@ -126,139 +115,13 @@ public class LocRefDetachedMOCCAConnector implements Connector, LocalConnector {
log.debug("analyzeSignResponse:");
String response_string = response_properties.getProperty(BKUPostConnection.RESPONSE_STRING_KEY);
BKUHelper.checkResponseForError(response_string);
- SignSignatureObject so = this.parseCreateXMLResponse(response_string, new DetachedMOCIdFormatter());
+ SignSignatureObject so = MOCCAHelper.parseCreateXMLResponse(response_string, new DetachedMOCIdFormatter());
so.response_properties = response_properties;
log.debug("analyzeSignResponse finished.");
return so;
}
/**
- * This method parses the signature creation response of the signature device.
- * @param xmlResponse The response string.
- * @return Returns the parsed signature object holding the data.
- * @see SignatureObject
- * @see CodingHelper
- * @see X509Cert
- */
- public SignSignatureObject parseCreateXMLResponse(String xmlResponse, IdFormatter id_formatter) throws ConnectorException {
-
- Pattern iss_nam_p_s = Pattern.compile("<[\\w]*:?X509IssuerName>");
- Pattern iss_nam_p_e = Pattern.compile("</[\\w]*:?X509IssuerName>");
- Pattern sig_tim_p_s = Pattern.compile("<[\\w]*:?SigningTime>");
- Pattern sig_tim_p_e = Pattern.compile("</[\\w]*:?SigningTime>");
- Pattern ser_num_p_s = Pattern.compile("<[\\w]*:?X509SerialNumber>");
- Pattern ser_num_p_e = Pattern.compile("</[\\w]*:?X509SerialNumber>");
- Pattern sig_cer_p_s = Pattern.compile("<[\\w]*:?X509Certificate>");
- Pattern sig_cer_p_e = Pattern.compile("</[\\w]*:?X509Certificate>");
-
- Matcher iss_nam_m_s = iss_nam_p_s.matcher(xmlResponse);
- Matcher iss_nam_m_e = iss_nam_p_e.matcher(xmlResponse);
- Matcher sig_tim_m_s = sig_tim_p_s.matcher(xmlResponse);
- Matcher sig_tim_m_e = sig_tim_p_e.matcher(xmlResponse);
- Matcher ser_num_m_s = ser_num_p_s.matcher(xmlResponse);
- Matcher ser_num_m_e = ser_num_p_e.matcher(xmlResponse);
- Matcher sig_cer_m_s = sig_cer_p_s.matcher(xmlResponse);
- Matcher sig_cer_m_e = sig_cer_p_e.matcher(xmlResponse);
-
- // SignatureValue
- String sig_val = null;
- Matcher signatureValueMatcher = Pattern.compile("<(\\w+:)?SignatureValue( Id=\"[\\w-]+\")?>\\s*(.*)\\s*</(\\w+:)?SignatureValue>").matcher(xmlResponse);
- if (signatureValueMatcher.find()) {
- sig_val = signatureValueMatcher.group(3);
- }
- log.debug("sig_val = " + sig_val);
-
- // X509IssuerName
- String iss_nam = null;
- if (iss_nam_m_s.find() && iss_nam_m_e.find()) {
- iss_nam = xmlResponse.substring(iss_nam_m_s.end(), iss_nam_m_e.start());
- }
- log.debug("iss_nam = " + iss_nam);
-
- // X509SerialNumber
- String ser_num = null;
- if (ser_num_m_s.find() && ser_num_m_e.find()) {
- ser_num = BKUHelper.removeAllWhitespace(xmlResponse.substring(ser_num_m_s.end(), ser_num_m_e.start()));
- }
- log.debug("ser_num = " + ser_num);
-
- // SigningTime
- String sig_tim = null;
- if (sig_tim_m_s.find() && sig_tim_m_e.find()) {
- sig_tim = xmlResponse.substring(sig_tim_m_s.end(), sig_tim_m_e.start());
- }
- log.debug("sig_tim = " + sig_tim);
-
- // X509Certificate
- X509Certificate cert = null;
- if (sig_cer_m_s.find() && sig_cer_m_e.find()) {
- String sig_cer = BKUHelper.removeAllWhitespace(xmlResponse.substring(sig_cer_m_s.end(), sig_cer_m_e.start()));
-
- try {
- byte[] der = CodingHelper.decodeBase64(sig_cer);
- ByteArrayInputStream bais = new ByteArrayInputStream(der);
- CertificateFactory cf = CertificateFactory.getInstance("X.509");
- cert = (X509Certificate) cf.generateCertificate(bais);
- bais.close();
- } catch (UnsupportedEncodingException e) {
- throw new ConnectorException(300, e);
- } catch (CertificateException e) {
- throw new ConnectorException(300, e);
- } catch (IOException e) {
- throw new ConnectorException(300, e);
- }
- }
- log.debug("X509Certificate = " + cert);
-
- if (log.isDebugEnabled()) {
-
- String cert_iss = cert.getIssuerDN().getName();
- log.debug("certificate's issuer = " + cert_iss);
- log.debug("response's issuer = " + iss_nam);
- log.debug("issuer matches = " + cert_iss.equals(iss_nam));
- log.debug("ser number matches = " + cert.getSerialNumber().toString().equals(ser_num));
- }
-
- // extract Signature Id's
- String[] ids = extractIds(xmlResponse);
- String final_ids = id_formatter.formatIds(ids);
-
- SignSignatureObject so = new SignSignatureObject();
- so.date = sig_tim;
- so.issuer = iss_nam;
- so.signatureValue = sig_val;
- so.x509Certificate = cert;
-
- so.id = final_ids;
-
- return so;
- }
-
- /**
- * Extraction of the id attributes from the xml response.
- * @param xmlResponse The xml response.
- * @return The parsed id attributes.
- */
- public final static String[] extractIds(String xmlResponse) {
- return new String[] { extractId(xmlResponse) };
- }
-
- /**
- * There is only one special common part of all id attributes of this connector that has to be
- * stored. This method returns that single part.
- * @param xmlResponse The xml response.
- * @return The parsed common part of all id attributes.
- */
- private final static String extractId(String xmlResponse) {
- final Pattern ID_PATTERN = Pattern.compile("Id\\s*=\\s*\"\\s*Signature-([\\p{XDigit}]+)-\\d+\\s*\"");
- Matcher matcher = ID_PATTERN.matcher(xmlResponse);
- if (matcher.find() && matcher.groupCount() > 0) {
- return matcher.group(1);
- }
- return null;
- }
-
- /**
* Verification is not supported by MOCCA. Therefore this method always throws a
* {@link ConnectorException} with error code {@link ErrorCode#SIGNATURE_VERIFICATION_NOT_SUPPORTED}.
*/
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java
new file mode 100644
index 0000000..1bb89be
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java
@@ -0,0 +1,194 @@
+package at.knowcenter.wag.egov.egiz.sig.connectors.mocca;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
+import at.knowcenter.wag.egov.egiz.sig.SignatureObject;
+import at.knowcenter.wag.egov.egiz.sig.X509Cert;
+import at.knowcenter.wag.egov.egiz.sig.connectors.bku.BKUHelper;
+import at.knowcenter.wag.egov.egiz.sig.connectors.bku.SignSignatureObject;
+import at.knowcenter.wag.egov.egiz.sig.sigid.IdFormatter;
+import at.knowcenter.wag.egov.egiz.tools.CodingHelper;
+
+/**
+ * Provides useful methods for the usage of the open source cce mocca.
+ *
+ * @author tknall
+ */
+public final class MOCCAHelper {
+
+ /**
+ * Prevents this plain util class from being instantiated.
+ */
+ private MOCCAHelper() {
+ }
+
+ /**
+ * The logging implementation.
+ */
+ private final static Log log = LogFactory.getLog(MOCCAHelper.class);
+
+ /**
+ * The pattern that identifies a mocca response (that matches the header value "Server" or "User-Agent").
+ */
+ private final static Pattern MOCCA_PATTERN = Pattern.compile("(citizen-card-environment/\\d+(\\.\\d+) MOCCA[ /].*)|(Jetty(.*))");
+
+ /**
+ * Checks if the given header value for "Server" or "User-Agent" respectively indicates that
+ * the response was from a mocca cce.
+ * @param cceId The value of the http header "Server" or "User-Agent".
+ * @see http://www.buergerkarte.at/konzept/securitylayer/spezifikation/aktuell/bindings/bindings.html#http.kodierung
+ * @return <code>true</code> if the id points to a mocca response, <code>false</code> if not.
+ */
+ public final static boolean isMOCCACCEId(String cceId) {
+ if (cceId == null) {
+ return false;
+ }
+ return MOCCA_PATTERN.matcher(cceId).matches();
+ }
+
+ /**
+ * This method parses the signature creation response of the signature
+ * device mocca.
+ *
+ * @param xmlResponse The response string.
+ * @return Returns the parsed signature object holding the data.
+ * @see SignatureObject
+ * @see CodingHelper
+ * @see X509Cert
+ */
+ public final static SignSignatureObject parseCreateXMLResponse(String xmlResponse, IdFormatter id_formatter) throws ConnectorException {
+
+ if (log.isDebugEnabled()) {
+ log.debug("xmlResponse = " + xmlResponse);
+ }
+
+ Pattern iss_nam_p_s = Pattern.compile("<[\\w]*:?X509IssuerName>");
+ Pattern iss_nam_p_e = Pattern.compile("</[\\w]*:?X509IssuerName>");
+ Pattern sig_tim_p_s = Pattern.compile("<[\\w]*:?SigningTime>");
+ Pattern sig_tim_p_e = Pattern.compile("</[\\w]*:?SigningTime>");
+ Pattern ser_num_p_s = Pattern.compile("<[\\w]*:?X509SerialNumber>");
+ Pattern ser_num_p_e = Pattern.compile("</[\\w]*:?X509SerialNumber>");
+ Pattern sig_cer_p_s = Pattern.compile("<[\\w]*:?X509Certificate>");
+ Pattern sig_cer_p_e = Pattern.compile("</[\\w]*:?X509Certificate>");
+
+ Matcher iss_nam_m_s = iss_nam_p_s.matcher(xmlResponse);
+ Matcher iss_nam_m_e = iss_nam_p_e.matcher(xmlResponse);
+ Matcher sig_tim_m_s = sig_tim_p_s.matcher(xmlResponse);
+ Matcher sig_tim_m_e = sig_tim_p_e.matcher(xmlResponse);
+ Matcher ser_num_m_s = ser_num_p_s.matcher(xmlResponse);
+ Matcher ser_num_m_e = ser_num_p_e.matcher(xmlResponse);
+ Matcher sig_cer_m_s = sig_cer_p_s.matcher(xmlResponse);
+ Matcher sig_cer_m_e = sig_cer_p_e.matcher(xmlResponse);
+
+ // SignatureValue
+ String sig_val = null;
+ Matcher signatureValueMatcher = Pattern.compile("<(\\w+:)?SignatureValue( Id=\"[\\w-]+\")?>\\s*(.*)\\s*</(\\w+:)?SignatureValue>").matcher(xmlResponse);
+ if (signatureValueMatcher.find()) {
+ sig_val = signatureValueMatcher.group(3);
+ }
+ log.debug("sig_val = " + sig_val);
+
+ // X509IssuerName
+ String iss_nam = null;
+ if (iss_nam_m_s.find() && iss_nam_m_e.find()) {
+ iss_nam = xmlResponse.substring(iss_nam_m_s.end(), iss_nam_m_e.start());
+ }
+ log.debug("iss_nam = " + iss_nam);
+
+ // X509SerialNumber
+ String ser_num = null;
+ if (ser_num_m_s.find() && ser_num_m_e.find()) {
+ ser_num = BKUHelper.removeAllWhitespace(xmlResponse.substring(ser_num_m_s.end(), ser_num_m_e.start()));
+ }
+ log.debug("ser_num = " + ser_num);
+
+ // SigningTime
+ String sig_tim = null;
+ if (sig_tim_m_s.find() && sig_tim_m_e.find()) {
+ sig_tim = xmlResponse.substring(sig_tim_m_s.end(), sig_tim_m_e.start());
+ }
+ log.debug("sig_tim = " + sig_tim);
+
+ // X509Certificate
+ X509Certificate cert = null;
+ if (sig_cer_m_s.find() && sig_cer_m_e.find()) {
+ String sig_cer = BKUHelper.removeAllWhitespace(xmlResponse.substring(sig_cer_m_s.end(), sig_cer_m_e.start()));
+
+ try {
+ byte[] der = CodingHelper.decodeBase64(sig_cer);
+ ByteArrayInputStream bais = new ByteArrayInputStream(der);
+ CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ cert = (X509Certificate) cf.generateCertificate(bais);
+ bais.close();
+ } catch (UnsupportedEncodingException e) {
+ throw new ConnectorException(300, e);
+ } catch (CertificateException e) {
+ throw new ConnectorException(300, e);
+ } catch (IOException e) {
+ throw new ConnectorException(300, e);
+ }
+ }
+ log.debug("X509Certificate = " + cert);
+
+ if (log.isDebugEnabled()) {
+
+ String cert_iss = cert.getIssuerDN().getName();
+ log.debug("certificate's issuer = " + cert_iss);
+ log.debug("response's issuer = " + iss_nam);
+ log.debug("issuer matches = " + cert_iss.equals(iss_nam));
+ log.debug("ser number matches = " + cert.getSerialNumber().toString().equals(ser_num));
+ }
+
+ // extract Signature Id's
+ String[] ids = extractIds(xmlResponse);
+ String final_ids = id_formatter.formatIds(ids);
+
+ SignSignatureObject so = new SignSignatureObject();
+ so.date = sig_tim;
+ so.issuer = iss_nam;
+ so.signatureValue = sig_val;
+ so.x509Certificate = cert;
+
+ so.id = final_ids;
+
+ return so;
+ }
+
+ /**
+ * Extraction of the id attributes from the xml response.
+ *
+ * @param xmlResponse The xml response.
+ * @return The parsed id attributes.
+ */
+ public final static String[] extractIds(String xmlResponse) {
+ return new String[] { extractId(xmlResponse) };
+ }
+
+ /**
+ * There is only one special common part of all id attributes of this
+ * connector that has to be stored. This method returns that single part.
+ *
+ * @param xmlResponse The xml response.
+ * @return The parsed common part of all id attributes.
+ */
+ private final static String extractId(String xmlResponse) {
+ final Pattern ID_PATTERN = Pattern.compile("Id\\s*=\\s*\"\\s*Signature-([\\p{XDigit}]+)-\\d+\\s*\"");
+ Matcher matcher = ID_PATTERN.matcher(xmlResponse);
+ if (matcher.find() && matcher.groupCount() > 0) {
+ return matcher.group(1);
+ }
+ return null;
+ }
+
+}
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java
index 2adc4b1..16352de 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/DataURLServlet.java
@@ -126,6 +126,7 @@ public class DataURLServlet extends HttpServlet
{
Object sessionObject = SessionHelper.getSession(request);
+ // obsolete since EncodingFilter is set in web.xml
checkRequestCharacterEncoding(request);
if (sessionObject instanceof SignSessionInformation)
@@ -152,8 +153,6 @@ public class DataURLServlet extends HttpServlet
protected void checkRequestCharacterEncoding(HttpServletRequest request) throws UnsupportedEncodingException
{
- log.debug("Request character encoding = " + request.getCharacterEncoding()); //$NON-NLS-1$
-// if (request.getCharacterEncoding() == null || request.getCharacterEncoding().equals("UTF-8")) //$NON-NLS-1$
if (request.getCharacterEncoding() == null || request.getCharacterEncoding().length() <= 0) //$NON-NLS-1$
{
log.info("The BKU didn't set a character encoding for the request."); //$NON-NLS-1$
@@ -220,12 +219,20 @@ public class DataURLServlet extends HttpServlet
response.setCharacterEncoding("UTF-8");
response.getWriter().println(request_string);
}
- else
+ else if (xml_response != null)
{
log.debug("Received a normal response -> storing the response."); //$NON-NLS-1$
Properties response_properties = new Properties();
response_properties.setProperty(BKUPostConnection.RESPONSE_STRING_KEY, xml_response);
+
+ String userAgent = request.getHeader("User-Agent");
+ if (userAgent != null) {
+ response_properties.setProperty(BKUPostConnection.BKU_USER_AGENT_HEADER_KEY, userAgent);
+ } else {
+ log.warn("BKU request/response header \"User-Agent\" is empty.");
+ }
+
si.response_properties = response_properties;
log.debug("All requests have been processed -> processing the responses."); //$NON-NLS-1$
@@ -294,7 +301,9 @@ public class DataURLServlet extends HttpServlet
// do not insert any code within this else block !
}
- }
+ } else {
+ log.debug("No XMLResponse found. Do nothing.");
+ }
}
protected void processVerify(HttpServletRequest request, HttpServletResponse response, VerifySessionInformation si) throws ServletException, IOException, ConnectorException, InvalidIDException
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java
index a8ff426..1efc64f 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/ProvidePDFServlet.java
@@ -59,8 +59,8 @@ public class ProvidePDFServlet extends HttpServlet {
log.debug("Signed pdf found.");
session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT);
log.debug("Returning signed pdf to browser.");
- log.debug("Invalidating session.");
- session.invalidate();
+// log.debug("Invalidating session.");
+// session.invalidate();
SignServletHelper.returnSignResponse(si, response);
return;
}
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 124b2a3..589de7c 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
@@ -244,8 +244,11 @@ public class SignServlet extends HttpServlet
catch (Exception e)
{
// Error retrieving data
- request.setAttribute("error", "Fehler beim Upload der Daten");
- request.setAttribute("cause", "Beim Upload der Daten ist ein Fehler aufgetreten.");
+// request.setAttribute("error", "Fehler beim Upload der Daten");
+// request.setAttribute("cause", "Beim Upload der Daten ist ein Fehler aufgetreten.");
+ request.setAttribute("error", "signservlet.error");
+ request.setAttribute("cause", "signservlet.cause");
+ request.setAttribute("resourcebundle", Boolean.TRUE);
dispatch(request, response, "/jsp/error.jsp");
return;
}
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
new file mode 100644
index 0000000..ba5d43e
--- /dev/null
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/web/servlets/UpdateFormServlet.java
@@ -0,0 +1,41 @@
+package at.knowcenter.wag.egov.egiz.web.servlets;
+
+import java.io.IOException;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import at.knowcenter.wag.egov.egiz.web.FormFields;
+
+public class UpdateFormServlet extends HttpServlet {
+
+ private static final long serialVersionUID = 1L;
+
+ 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";
+
+ 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 device = request.getParameter(FormFields.FIELD_CONNECTOR);
+ String type = request.getParameter(FormFields.FIELD_SIGNATURE_TYPE);
+
+ 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);
+
+ RequestDispatcher dispatcher = request.getRequestDispatcher("/jsp/signupload.jsp");
+ dispatcher.forward(request, response);
+// response.sendRedirect(response.encodeRedirectURL(request.getContextPath() + "/jsp/signupload.jsp"));
+ }
+
+}
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 5e1819e..0eb417b 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
@@ -699,8 +699,9 @@ public class VerifyPreviewServlet extends HttpServlet
}
catch (FileUploadException e)
{
- request.setAttribute("error", "Fehler beim Upload der Daten");
- request.setAttribute("cause", "Beim Upload der Daten ist ein Fehler aufgetreten.");
+ request.setAttribute("error", "verifypreviewservlet.error");
+ request.setAttribute("cause", "verifypreviewservlet.cause");
+ request.setAttribute("resourcebundle", Boolean.TRUE);
dispatch(request, response, "/jsp/error.jsp");
}
catch (PresentableException e)
diff --git a/src/main/java/at/knowcenter/wag/exactparser/parsing/PDFUtils.java b/src/main/java/at/knowcenter/wag/exactparser/parsing/PDFUtils.java
index 1387fb2..88476be 100644
--- a/src/main/java/at/knowcenter/wag/exactparser/parsing/PDFUtils.java
+++ b/src/main/java/at/knowcenter/wag/exactparser/parsing/PDFUtils.java
@@ -387,7 +387,8 @@ public abstract class PDFUtils
while (isNumeric(pdf[index]) || pdf[index] == '.')
{
- number += (char) pdf[index];
+ char digit = (char) pdf[index];
+ number += digit;
index++;
}
diff --git a/src/main/resources/DefaultConfiguration.zip b/src/main/resources/DefaultConfiguration.zip
index a8c4e6a..a7f41b5 100644
--- a/src/main/resources/DefaultConfiguration.zip
+++ b/src/main/resources/DefaultConfiguration.zip
Binary files differ
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
new file mode 100644
index 0000000..fc07625
--- /dev/null
+++ b/src/main/resources/at/gv/egiz/pdfas/web/i18n/language.properties
@@ -0,0 +1,96 @@
+
+common.back = back
+common.backtolist = back to list
+common.binary = binary
+common.bku = Local CCS
+common.locale.param = locale=en
+common.mocca = Online CCS
+common.textual = textual
+common.title = PDF Signature
+
+dataok.heading2 = Data modification
+dataok.taken = Data modification successfully applied.
+
+download.button.alreadydone = Document already downloaded
+download.button.download = Download signed document
+download.heading2 = Sign document
+download.note = Signature procedure successfully completed. The signed document is ready for download.<br/>Note: The document can only be downloaded once. The document will not be stored on the server.
+download.title = PDF Signature: Download
+
+error.cause = Cause
+error.heading2 = An error occurred
+error.title = PDF Signature: Result
+
+errorverify.cause = Cause
+errorverify.heading2 = An error occurred
+errorverify.title = PDF Signature: Result
+
+nullrequestpage.button.pleasewait = Please wait...
+nullrequestpage.button.submit = Submit...
+nullrequestpage.heading2 = Sign pdf document
+nullrequestpage.note = Contacting your citizen card software...
+nullrequestpage.title = PDF Signature: Local Connection
+
+pleasewait.body = Please wait.<br/>\r\nLoading applet...
+pleasewait.title = Online CCS
+
+results.certificate = Certificate
+results.certificatecheck = Certificate-Check
+results.heading2 = Validation result
+results.issuer = Issuer
+results.manifestcheck = Manifest-Check
+results.property = Property
+results.serialnumber = Serial Number
+results.signaturecheck = Signature-Check
+results.signer = Signer
+
+signaturblock.issuer.value.cn = Issuername
+signaturblock.issuer.value.o = Issuerorganisation
+signaturblock.signer.value = will be taken from certificate
+
+signpreview.button.sign = Sign...
+signpreview.heading2 = Preview: Sign document
+signpreview.showpreview = Show preview...
+signpreview.title = PDF Signature: Preview
+
+signservlet.cause = An error occurred uploading the data.
+signservlet.error = Error uploading data
+
+signupload.button.preview = Preview
+signupload.button.sign = Sign document
+signupload.documentnotselected = Please select a pdf document to be signed.
+signupload.documentnotselected.preview = Please select a pdf document to be signed for preview.
+signupload.file = PDF document
+signupload.heading2 = Sign document
+signupload.note = Documents signed in textual mode can only be verified if the underlying certificate can be retrieved from a directory service.
+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.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
+signupload.signaturetype = Signature type
+signupload.signaturetype.signaturblock.de = German default signature
+signupload.signaturetype.signaturblock.en = English default signature
+
+test.common.title = PDF Signature (test)
+
+verifylist.button.preview = Preview...
+verifylist.button.verifyallsignatures = Verify all
+verifylist.button.verifysinglesignature = Verify this signature only
+verifylist.heading2.plural = Verify document signatures
+verifylist.heading2.singular = Verify document signature
+
+verifypreview.applyvalues = Commit values
+verifypreview.applyvaluesandverify = Commit values and verify
+verifypreview.heading2 = Preview: Verify document
+verifypreview.reconstruction = Reconstruction of the signature mark
+
+verifypreviewservlet.cause = An error occurred uploading the data.
+verifypreviewservlet.error = Error uploading data
+
+verifyupload.button.listsignatures = List signatures
+verifyupload.button.verifyallsignatures = Verify all
+verifyupload.heading2 = Verify document signature
+verifyupload.note = Please enter the complete document text together with the signature block.
+verifyupload.verifydevice = Verification device
+verifyupload.verifymode = Verification 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
new file mode 100644
index 0000000..93818b2
--- /dev/null
+++ b/src/main/resources/at/gv/egiz/pdfas/web/i18n/language_de.properties
@@ -0,0 +1,96 @@
+
+common.back = zurück
+common.backtolist = zurück zur Liste
+common.binary = binär
+common.bku = Lokale BKU
+common.locale.param = locale=de
+common.mocca = Online BKU
+common.textual = textuell
+common.title = PDF-Signatur
+
+dataok.heading2 = Datenänderung
+dataok.taken = Die Daten wurden erfolgreich übernommen.
+
+download.button.alreadydone = Download bereits erfolgt
+download.button.download = Signiertes Dokument herunterladen
+download.heading2 = Dokument Signatur erstellen
+download.note = Der Signatur-Vorgang ist abgeschlossen. Das signierte Dokument kann nun heruntergeladen werden.<br/>Hinweis: Der Download ist nur einmalig möglich. Das Dokument wird nicht am Server gespeichert.
+download.title = PDF-Signatur: Download
+
+error.cause = Ursache
+error.heading2 = Ein Fehler ist aufgetreten
+error.title = PDF-Signatur: Resultat
+
+errorverify.cause = Ursache
+errorverify.heading2 = Ein Fehler ist aufgetreten
+errorverify.title = PDF-Signatur: Resultat
+
+nullrequestpage.button.pleasewait = Bitte warten...
+nullrequestpage.button.submit = Absenden...
+nullrequestpage.heading2 = PDF Dokument signieren
+nullrequestpage.note = Die Verbindung zu Ihrer Bürgerkartenumgebung wird hergestellt...
+nullrequestpage.title = PDF-Signatur: Lokale Verbindung
+
+pleasewait.body = Bitte warten.<br/>\r\nApplet wird geladen...
+pleasewait.title = Online BKU
+
+results.certificate = Zertifikat
+results.certificatecheck = Zertifikats-Prüfung
+results.heading2 = Prüfergebnis
+results.issuer = Aussteller
+results.manifestcheck = Manifest-Prüfung
+results.property = Eigenschaft
+results.serialnumber = Seriennummer
+results.signaturecheck = Signatur-Prüfung
+results.signer = Signator
+
+signaturblock.issuer.value.cn = Ausstellername
+signaturblock.issuer.value.o = Ausstellerorganisation
+signaturblock.signer.value = wird aus dem Zertifikat extrahiert
+
+signpreview.button.sign = Signieren...
+signpreview.heading2 = Vorschau: Dokument Signieren
+signpreview.showpreview = Vorschaudokument anzeigen...
+signpreview.title = PDF-Signatur: Vorschau
+
+signservlet.cause = Beim Upload der Daten ist ein Fehler aufgetreten.
+signservlet.error = Fehler beim Upload der Daten
+
+signupload.button.preview = Vorschau
+signupload.button.sign = Signatur erstellen
+signupload.documentnotselected = Bitte wählen Sie das zu signierende PDF-Dokument aus.
+signupload.documentnotselected.preview = Bitte wählen Sie das zu signierende PDF-Dokument für die Vorschau aus.
+signupload.file = PDF Dokument
+signupload.heading2 = Dokument Signatur erstellen
+signupload.note = Im textuellen Modus signierte Dokumente können nur dann geprüft werden, wenn das Zertifikat in einem Verzeichnisdienst verfügbar ist.
+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.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
+signupload.signaturetype = Signaturtyp
+signupload.signaturetype.signaturblock.de = Standardsignatur Deutsch
+signupload.signaturetype.signaturblock.en = Standardsignatur Englisch
+
+test.common.title = PDF-Signatur (Test)
+
+verifylist.button.preview = Vorschau...
+verifylist.button.verifyallsignatures = Alle prüfen
+verifylist.button.verifysinglesignature = Nur diese Signatur prüfen
+verifylist.heading2.plural = Dokument Signaturen prüfen
+verifylist.heading2.singular = Dokument Signatur prüfen
+
+verifypreview.applyvalues = Werte übernehmen
+verifypreview.applyvaluesandverify = Werte übernehmen und prüfen
+verifypreview.heading2 = Vorschau: Dokument prüfen
+verifypreview.reconstruction = Rekonstruktion der Signaturmarke
+
+verifypreviewservlet.cause = Beim Upload der Daten ist ein Fehler aufgetreten.
+verifypreviewservlet.error = Fehler beim Upload der Daten
+
+verifyupload.button.listsignatures = Signaturen auflisten
+verifyupload.button.verifyallsignatures = Alle prüfen
+verifyupload.heading2 = Dokument Signatur prüfen
+verifyupload.note = Hier bitte den vollständigen Dokumenttext samt Signaturblock eingeben.
+verifyupload.verifydevice = Prüf-Applikation
+verifyupload.verifymode = Prüf-Modus
diff --git a/src/main/webapp/META-INF/context.xml b/src/main/webapp/META-INF/context.xml
index b27ca81..a0de89e 100644
--- a/src/main/webapp/META-INF/context.xml
+++ b/src/main/webapp/META-INF/context.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Context path="/pdf-as" cookies="false" reloadable="false">
+<Context path="/pdf-as" cookies="true" reloadable="false">
<Manager pathname="" />
<!-- Use system property "pdf-as.work-dir" or web.xml parameter "work-dir" instead. -->
diff --git a/src/main/webapp/WEB-INF/decorators.xml b/src/main/webapp/WEB-INF/decorators.xml
index 64ee415..a88892d 100644
--- a/src/main/webapp/WEB-INF/decorators.xml
+++ b/src/main/webapp/WEB-INF/decorators.xml
@@ -2,13 +2,14 @@
<excludes>
<pattern>/bku-erkennung/*</pattern>
+ <pattern>/jsp/please_wait.jsp</pattern>
<pattern>/css/*</pattern>
<pattern>/img/*</pattern>
<pattern>*.pdf</pattern>
<pattern>/*.pdf</pattern>
</excludes>
- <decorator name="admin" page="/sitemesh/standalone.jsp">
+ <decorator name="standalone" page="/sitemesh/standalone.jsp">
<pattern>/*</pattern>
</decorator>
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 3b97dab..ce82e9a 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -27,11 +27,43 @@
</context-param>
<filter>
+ <filter-name>encodingFilter</filter-name>
+ <filter-class>at.gv.egiz.pdfas.web.filter.EncodingFilter</filter-class>
+ <init-param>
+ <param-name>encoding</param-name>
+ <param-value>UTF-8</param-value>
+ </init-param>
+ <init-param>
+ <param-name>setRequestEncoding</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>forceRequestEncoding</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ </filter>
+
+ <filter>
+ <filter-name>localeparam</filter-name>
+ <filter-class>at.gv.egiz.pdfas.web.i18n.LocaleParamFilter</filter-class>
+ </filter>
+
+ <filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter-mapping>
+ <filter-name>encodingFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>localeparam</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
@@ -86,8 +118,8 @@
</servlet>
<servlet>
- <servlet-name>SetLanguage</servlet-name>
- <servlet-class>at.gv.egiz.pdfas.web.i18n.SetLanguageServlet</servlet-class>
+ <servlet-name>UpdateForm</servlet-name>
+ <servlet-class>at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet</servlet-class>
</servlet>
<servlet-mapping>
@@ -136,8 +168,8 @@
</servlet-mapping>
<servlet-mapping>
- <servlet-name>SetLanguage</servlet-name>
- <url-pattern>/SetLanguage</url-pattern>
+ <servlet-name>UpdateForm</servlet-name>
+ <url-pattern>/UpdateForm</url-pattern>
</servlet-mapping>
<session-config>
diff --git a/src/main/webapp/images/button-search.jpg b/src/main/webapp/images/button-search.jpg
new file mode 100644
index 0000000..3a17347
--- /dev/null
+++ b/src/main/webapp/images/button-search.jpg
Binary files differ
diff --git a/src/main/webapp/images/chiperling.jpg b/src/main/webapp/images/chiperling.jpg
new file mode 100644
index 0000000..fcb633a
--- /dev/null
+++ b/src/main/webapp/images/chiperling.jpg
Binary files differ
diff --git a/src/main/webapp/images/menu-divider.jpg b/src/main/webapp/images/menu-divider.jpg
new file mode 100644
index 0000000..53272d7
--- /dev/null
+++ b/src/main/webapp/images/menu-divider.jpg
Binary files differ
diff --git a/src/main/webapp/images/signatur-logo_en-100.png b/src/main/webapp/images/signatur-logo_en-100.png
new file mode 100644
index 0000000..0d84ca7
--- /dev/null
+++ b/src/main/webapp/images/signatur-logo_en-100.png
Binary files differ
diff --git a/src/main/webapp/images/signatur-logo_en.png b/src/main/webapp/images/signatur-logo_en.png
new file mode 100644
index 0000000..505e6a5
--- /dev/null
+++ b/src/main/webapp/images/signatur-logo_en.png
Binary files differ
diff --git a/src/main/webapp/jsp/SIGNATURBLOCK.jsp b/src/main/webapp/jsp/SIGNATURBLOCK.jsp
new file mode 100644
index 0000000..dc21f9a
--- /dev/null
+++ b/src/main/webapp/jsp/SIGNATURBLOCK.jsp
@@ -0,0 +1,110 @@
+<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage=""%>
+
+<%@ page import="org.apache.commons.lang.time.DateFormatUtils" %>
+<%@ page import="java.util.Date" %>
+<%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet"%>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %>
+
+<%@ include file="language.jsp" %>
+
+ <%
+ String mode = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY);
+ String device = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY);
+ String type = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY);
+
+ String sbValue;
+ String sbLabel;
+ String sbMeta;
+ String sbName;
+ String sbDate;
+ String sbIssuer;
+ String sbNumber;
+ String sbKZ;
+ String sbID;
+ String sbMetaValue;
+ if ("SIGNATURBLOCK_DE".equals(type)) {
+ sbValue = "Signaturwert";
+ sbLabel = "signatur-logo_de-100.png";
+ sbMetaValue = "Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: <input type=\"text\" name=\"vservice\" readonly=\"readonly\" disabled=\"disabled\" value=\"https://www.buergerkarte.at/signature-verification\" size=\"50\" maxlength=\"255\"/>";
+ sbName = "Unterzeichner";
+ sbDate = "Datum/Zeit-UTC";
+ sbIssuer = "Aussteller-Zertifikat";
+ sbNumber = "Serien-Nr.";
+ sbKZ = "Methode";
+ sbID = "Parameter";
+ sbMeta = "Prüfinformation";
+ } else {
+ sbValue = "Signature Value";
+ sbLabel = "signatur-logo_en-100.png";
+ sbMetaValue = "Information about the verification of the electronic signature and of the printout can be found at: <input type=\"text\" name=\"vservice\" readonly=\"readonly\" disabled=\"disabled\" value=\"https://www.buergerkarte.at/signature-verification\" size=\"50\" maxlength=\"255\"/>";
+ sbName = "Signatory";
+ sbDate = "Date/Time-UTC";
+ sbIssuer = "Issuer-Certificate";
+ sbNumber = "Serial-No.";
+ sbKZ = "Method";
+ sbID = "Parameter";
+ sbMeta = "Verification";
+ }
+
+ %>
+
+<html>
+
+<table border="0" cellpadding="3" cellspacing="0" class="pdfassignature">
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbValue %></td>
+ <td colspan="2" class="pdfasvalue">
+ <div style="float:left;">Aqs3vMeF81wm/UJjIcLOzUs9</div>
+ <div style="float:left;">dxTBzhi2RC8avQyMAmc3v</div>
+ <div style="float:left;">WEj9HT1DI3iish4smRr</div>
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="6"><img src="<%= request.getContextPath() %>/images/<%= sbLabel %>" width="100" alt="Signatur-Logo"/></td>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbName %></td>
+ <td class="pdfasvalue"><input type="text" name="signer" value="<fmt:message key="signaturblock.signer.value"/>" readonly="readonly" disabled="disabled" size="40" maxlength="255"/></td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbDate %></td>
+ <td class="pdfasvalue"><%= DateFormatUtils.formatUTC(new Date(), "yyyy-MM-dd'T'HH:mm:ss'Z'", request.getLocale()) %></td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbIssuer %></td>
+ <td class="pdfasvalue">
+ <div class="pdfasnobreak">CN=<fmt:message key="signaturblock.issuer.value.cn"/>,</div>
+ <div class="pdfasnobreak">O=<fmt:message key="signaturblock.issuer.value.o"/>,</div>
+ <div class="pdfasnobreak">C=AT</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbNumber %></td>
+ <td class="pdfasvalue">123456</td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbKZ %></td>
+ <td class="pdfasvalue">
+ <div class="pdfasnobreak">urn:pdfsigfilter:</div>
+ <div class="pdfasnobreak">bka.gv.at:</div>
+ <div class="pdfasnobreak"><%= FormFields.VALUE_MODE_TEXTUAL.equals(mode) ? "text" : "binaer" %>:v1.1.0</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbID %></td>
+ <td class="pdfasvalue">
+ <% if (Constants.SIGNATURE_DEVICE_MOC.equals(device)) { %>
+ <div class="pdfasnobreak">etsi-moc-1.0@12345678</div>
+ <% } else { %>
+ <div class="pdfasnobreak">etsi-bka-1.0@1234567890-123456789@</div>
+ <div class="pdfasnobreak">12345-1234-</div>
+ <div class="pdfasnobreak">0-</div>
+ <div class="pdfasnobreak">12345-</div>
+ <div class="pdfasnobreak">12345</div></td>
+ <% } // end if %>
+ </tr>
+ <tr>
+ <td class="pdfaslabel" nowrap="nowrap"><%= sbMeta %></td>
+ <td colspan="2" class="pdfasvalue"><%= sbMetaValue %></td>
+ </tr>
+</table>
+</html> \ No newline at end of file
diff --git a/src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp b/src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp
deleted file mode 100644
index 3b48294..0000000
--- a/src/main/webapp/jsp/SIGNATURBLOCK_DE.jsp
+++ /dev/null
@@ -1,61 +0,0 @@
-<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage=""%>
-
-<%@ page import="org.apache.commons.lang.time.DateFormatUtils" %>
-<%@ page import="java.util.Date" %>
-
-<html:xhtml />
-
-<table border="0" cellpadding="3" cellspacing="0" class="pdfassignature">
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Signaturwert</td>
- <td colspan="2" class="pdfasvalue">
- <div style="float:left;">Aqs3vMeF81wm/UJjIcLOzUs9</div>
- <div style="float:left;">dxTBzhi2RC8avQyMAmc3v</div>
- <div style="float:left;">WEj9HT1DI3iish4smRr</div>
- </td>
- </tr>
- <tr>
- <td rowspan="6"><img src="<%= request.getContextPath() %>/images/signatur-logo_de-100.png" width="100" alt="Signatur-Logo"/></td>
- <td class="pdfaslabel" nowrap="nowrap">Unterzeichner</td>
- <td class="pdfasvalue"><input type="text" name="signer" value="&lt;wird aus dem Zertifikat extrahiert&gt;" readonly="readonly" disabled="disabled" size="40" maxlength="255"/></td>
- </tr>
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Datum/Zeit-UTC</td>
- <td class="pdfasvalue"><%= DateFormatUtils.formatUTC(new Date(), "yyyy-MM-dd'T'HH:mm:ss'Z'", request.getLocale()) %></td>
- </tr>
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Aussteller-Zertifikat</td>
- <td class="pdfasvalue">
- <div class="pdfasnobreak">CN=Ausstellername,</div>
- <div class="pdfasnobreak">O=Ausstellerorganisation,</div>
- <div class="pdfasnobreak">C=AT</div>
- </td>
- </tr>
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Serien-Nr.</td>
- <td class="pdfasvalue">123456</td>
- </tr>
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Methode</td>
- <td class="pdfasvalue">
- <div class="pdfasnobreak">urn:pdfsigfilter:</div>
- <div class="pdfasnobreak">bka.gv.at:</div>
- <div class="pdfasnobreak">text:v1.1.0</div>
- </td>
- </tr>
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Parameter</td>
- <td class="pdfasvalue">
- <div class="pdfasnobreak">etsi-bka-1.0@1234567890-123456789@</div>
- <div class="pdfasnobreak">12345-1234-</div>
- <div class="pdfasnobreak">0-</div>
- <div class="pdfasnobreak">12345-</div>
- <div class="pdfasnobreak">12345</div></td>
- </tr>
- <tr>
- <td class="pdfaslabel" nowrap="nowrap">Pr&uuml;finformation</td>
- <td colspan="2" class="pdfasvalue">
- Informationen zur Pr&uuml;fung der elektronischen Signatur und des Ausdrucks finden Sie unter: <input type="text" name="vservice" readonly="readonly" disabled="disabled" value="https://www.buergerkarte.at/signature-verification" size="50" maxlength="255"/>
- </td>
- </tr>
-</table>
diff --git a/src/main/webapp/jsp/dataok.jsp b/src/main/webapp/jsp/dataok.jsp
index c77fb46..ae209ab 100644
--- a/src/main/webapp/jsp/dataok.jsp
+++ b/src/main/webapp/jsp/dataok.jsp
@@ -1,24 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ include file="language.jsp" %>
+
<html>
<head>
-<title>PDF-AS Amtssignaturen</title>
+<title><fmt:message key="common.title"/></title>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/css/styles.css" />
</head>
<body>
<div class="maindiv">
-<h1>PDF-AS Amtssignaturen</h1>
-<div class="mainframe">
-<div class="mainheadline">Daten&auml;nderung</div>
+<h1><fmt:message key="common.title"/></h1>
+<h2><fmt:message key="dataok.heading2"/></h2>
<p>
-Die Daten wurden erfolgreich &uuml;bernommen.
+<fmt:message key="dataok.taken"/>
</p>
-</div>
<%
String btlurl = (String)request.getAttribute("btlurl");
%>
-<a class="big" href="<%=btlurl%>">zur&uuml;ck zur Liste</a>
+<a class="big" href="<%=btlurl%>"><fmt:message key="common.backtolist"/></a>
</div>
</body>
</html> \ No newline at end of file
diff --git a/src/main/webapp/jsp/download.jsp b/src/main/webapp/jsp/download.jsp
index 76180cc..95109e3 100644
--- a/src/main/webapp/jsp/download.jsp
+++ b/src/main/webapp/jsp/download.jsp
@@ -1,5 +1,7 @@
<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ include file="language.jsp" %>
+
<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %>
<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
@@ -9,7 +11,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>PDF-Signaturen Lokale Verbindung</title>
+ <title><fmt:message key="download.title"/></title>
<script language="javascript" type="text/javascript">
<!--
function disableElement(elementId) {
@@ -19,7 +21,7 @@
function hitButton() {
document.submitform.submit();
disableElement("SendRequestButton");
- document.getElementById("SendRequestButton").value = "Download bereits erfolgt";
+ document.getElementById("SendRequestButton").value = "<fmt:message key="download.button.alreadydone"/>";
return(true);
}
-->
@@ -28,15 +30,15 @@
</head>
<body>
- <h1>PDF-Signaturen</h1>
- <h2>Dokument Signatur erstellen</h2>
- <div class="pdfasnote">Der Signatur-Vorgang ist abgeschlossen. Das signierte Dokument kann nun heruntergeladen werden.<br/>Hinweis: Der Download ist nur einmalig m&ouml;glich. Das Dokument wird nicht am Server gespeichert.</div>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="download.heading2"/></h2>
+ <div class="pdfasnote"><fmt:message key="download.note"/></div>
<div class="pdfasverticalspace"></div>
<form action="<%= downloadURL %>" name="submitform" accept-charset="UTF-8" method="post" enctype="application/x-www-form-urlencoded">
- <input type="submit" id="SendRequestButton" value="Signiertes Dokument herunterladen" onclick="return hitButton();"/>
+ <input type="submit" id="SendRequestButton" value="<fmt:message key="download.button.download"/>" onclick="return hitButton();"/>
</form>
<div class="pdfasverticalspace"></div>
- <a href="<%= request.getContextPath() %>/">zur&uuml;ck</a>
+ <a href="<%= (response.encodeRedirectURL(request.getContextPath() + "/") + "?") %><fmt:message key="common.locale.param"/>"><fmt:message key="common.back"/></a>
</body>
</html>
diff --git a/src/main/webapp/jsp/error.jsp b/src/main/webapp/jsp/error.jsp
index 0ec94d8..2183a62 100644
--- a/src/main/webapp/jsp/error.jsp
+++ b/src/main/webapp/jsp/error.jsp
@@ -4,11 +4,13 @@
<%@ page import="at.knowcenter.wag.egov.egiz.exceptions.*" %>
<%@ page import="java.io.*" %>
+<%@ include file="language.jsp" %>
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>PDF-Signaturen Resultat</title>
+ <title><fmt:message key="error.title"/></title>
<base href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/"/>
</head>
@@ -22,15 +24,24 @@
String error = (request.getAttribute("error") == null ? "" : request.getAttribute("error").toString());
String cause = (request.getAttribute("cause") == null ? "" : request.getAttribute("cause").toString());
+ boolean rb = Boolean.TRUE.equals((Boolean) request.getAttribute("resourcebundle"));
%>
<body>
- <h1>PDF-Signaturen</h1>
- <h2>Ein Fehler ist aufgetreten</h2>
- <div class="pdfasnote"><%= error %></div>
- <div class="pdfasnote">Ursache: <strong><%= cause %></strong></div>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="error.heading2"/></h2>
+ <div class="pdfasnote">
+ <% if (rb) { %>
+ <fmt:message key="<%= error %>"/>
+ <% } else { out.write(error); } %>
+ </div>
+ <div class="pdfasnote"><fmt:message key="error.cause"/>: <strong>
+ <% if (rb) { %>
+ <fmt:message key="<%= cause %>"/>
+ <% } else { out.write(cause); } %>
+ </strong></div>
<div class="pdfasverticalspace"></div>
- <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/">zur&uuml;ck</a>
+ <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/"><fmt:message key="common.back"/></a>
<pre style="display:none">
<%
if (pe != null) {
diff --git a/src/main/webapp/jsp/error_verify.jsp b/src/main/webapp/jsp/error_verify.jsp
index 3b82a32..7d3e5cc 100644
--- a/src/main/webapp/jsp/error_verify.jsp
+++ b/src/main/webapp/jsp/error_verify.jsp
@@ -4,11 +4,13 @@
<%@ page import="at.knowcenter.wag.egov.egiz.exceptions.*" %>
<%@ page import="java.io.*" %>
+<%@ include file="language.jsp" %>
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>PDF-Signaturen Resultat</title>
+ <title><fmt:message key="errorverify.title"/></title>
<base href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/"/>
</head>
@@ -25,12 +27,12 @@
%>
<body>
- <h1>PDF-Signaturen</h1>
- <h2>Ein Fehler ist aufgetreten</h2>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="errorverify.heading2"/></h2>
<div class="pdfasnote"><%= error %></div>
- <div class="pdfasnote">Ursache: <strong><%= cause %></strong></div>
+ <div class="pdfasnote"><fmt:message key="errorverify.cause"/>: <strong><%= cause %></strong></div>
<div class="pdfasverticalspace"></div>
- <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/jsp/verifyupload.jsp">zur&uuml;ck</a>
+ <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/jsp/verifyupload.jsp"><fmt:message key="common.back"/></a>
<pre style="display:none">
<%
if (pe != null) {
diff --git a/src/main/webapp/jsp/language.jsp b/src/main/webapp/jsp/language.jsp
new file mode 100644
index 0000000..11aad84
--- /dev/null
+++ b/src/main/webapp/jsp/language.jsp
@@ -0,0 +1,9 @@
+<%@ page import="at.gv.egiz.pdfas.web.i18n.LocaleParamFilter" %>
+<%@ page import="java.util.Locale" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
+<%
+ Locale currentLocale = (Locale) session.getAttribute(LocaleParamFilter.LOCALE_SESSION_KEY);
+ if (currentLocale != null) {
+%>
+ <fmt:setLocale value="<%= currentLocale.getLanguage() %>"/>
+<% } // end if %>
diff --git a/src/main/webapp/jsp/null_request_page.jsp b/src/main/webapp/jsp/null_request_page.jsp
index 5773f63..c54fa26 100644
--- a/src/main/webapp/jsp/null_request_page.jsp
+++ b/src/main/webapp/jsp/null_request_page.jsp
@@ -1,41 +1,67 @@
<%@ page contentType="text/html; charset=UTF-8"%>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.UpdateFormServlet"%>
+<%@ page import="java.util.Locale" %>
+<%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %>
+<%@ include file="language.jsp" %>
<%
String local_request_url = (String)request.getAttribute("local_request_url");
String data_url = (String)request.getAttribute("data_url");
+ String device = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY);
+ Locale locale = (Locale) session.getAttribute(LocaleParamFilter.LOCALE_SESSION_KEY);
+
+ boolean isOnlineMOCCA = Constants.SIGNATURE_DEVICE_MOC.equals(device);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>PDF-Signaturen Lokale Verbindung</title>
+ <title><fmt:message key="nullrequestpage.title"/></title>
<script language="javascript" type="text/javascript">
<!--
function disableElement(elementId) {
- document.getElementById(elementId).disabled = true;
- document.getElementById(elementId).blur();
+ if (elementId != null && document.getElementById(elementId)) {
+ document.getElementById(elementId).disabled = true;
+ document.getElementById(elementId).blur();
+ }
return(true);
}
function hitButton() {
document.submitform.submit();
disableElement("SendRequestButton");
- document.getElementById("SendRequestButton").value = "Bitte warten...";
+ if (document.getElementById("SendRequestButton")) {
+ document.getElementById("SendRequestButton").value = "<fmt:message key="nullrequestpage.button.pleasewait"/>";
+ }
}
-->
</script>
</head>
<body>
- <h1>PDF-Signaturen</h1>
- <h2>Dokument Signatur erstellen</h2>
- <div class="pdfasnote">Die Verbindung zu Ihrer B&uuml;rgerkartenumgebung wird hergestellt...</div>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="nullrequestpage.heading2"/></h2>
+ <div class="pdfasnote"><fmt:message key="nullrequestpage.note"/></div>
+ <% if (isOnlineMOCCA) { %>
+ <form action="<%= local_request_url %>" name="submitform" accept-charset="UTF-8" method="post" target="moccaframe">
+ <input type="hidden" name="XMLRequest" value="<?xml version='1.0' encoding='UTF-8'?><NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" />
+ <input type="hidden" name="DataURL" value="<%= data_url %>" />
+ <input type="hidden" name="appletWidth" value="190"/>
+ <input type="hidden" name="appletHeight" value="130"/>
+ <% if (locale != null) { %>
+ <input type="hidden" name="locale" value="<%= locale.toString() %>"/>
+ <% } // end if %>
+ </form>
+ <div class="pdfasverticalspace"></div>
+ <iframe name="moccaframe" style="border: 1px solid black;" width="190" height="130" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="<%= request.getContextPath() %>/jsp/please_wait.jsp" ></iframe>
+ <% } else { %>
<div class="pdfasverticalspace"></div>
- <form action="<%= local_request_url %>" name="submitform" accept-charset="UTF-8" method="post"><!-- enctype="multipart/form-data"-->
- <input type="hidden" name="XMLRequest" value="<?xml version='1.0' encoding='UTF-8'?><NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" />
- <input type="hidden" name="DataURL" value="<%= data_url %>" />
- <input type="submit" id="SendRequestButton" value="Absenden..." />
- </form>
+ <form action="<%= local_request_url %>" name="submitform" accept-charset="UTF-8" method="post">
+ <input type="hidden" name="XMLRequest" value="<?xml version='1.0' encoding='UTF-8'?><NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" />
+ <input type="hidden" name="DataURL" value="<%= data_url %>" />
+ <input type="submit" id="SendRequestButton" value="<fmt:message key="nullrequestpage.button.submit"/>" />
+ </form>
+ <% } // end if %>
<div class="pdfasverticalspace"></div>
- <a href="<%= request.getContextPath() %>/">zur&uuml;ck</a>
+ <a href="<%= request.getContextPath() %>/"><fmt:message key="common.back"/></a>
<script language="javascript" type="text/javascript">
<!--
window.setTimeout("hitButton()", 800);
diff --git a/src/main/webapp/jsp/please_wait.jsp b/src/main/webapp/jsp/please_wait.jsp
new file mode 100644
index 0000000..62c0d28
--- /dev/null
+++ b/src/main/webapp/jsp/please_wait.jsp
@@ -0,0 +1,16 @@
+<%@ page contentType="text/html; charset=UTF-8" language="java" errorPage=""%>
+
+<%@ include file="language.jsp" %>
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title><fmt:message key="pleasewait.title"/></title>
+</head>
+
+<body>
+ <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
+ <tr height="100%" valign="middle">
+ <td align="center"><fmt:message key="pleasewait.body"/></td>
+ </tr>
+ </table>
+</body>
diff --git a/src/main/webapp/jsp/results.jsp b/src/main/webapp/jsp/results.jsp
index faabc27..f3ab71c 100644
--- a/src/main/webapp/jsp/results.jsp
+++ b/src/main/webapp/jsp/results.jsp
@@ -3,6 +3,8 @@
<%@ page import="java.util.Iterator" %>
<%@ page import="at.knowcenter.wag.egov.egiz.sig.SignatureResponse" %>
+<%@ include file="language.jsp" %>
+
<%
List results = (List) request.getAttribute("results");
Object bb = request.getAttribute("backbutton");
@@ -15,11 +17,11 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>PDF-Signaturen</title>
+ <title><fmt:message key="common.title"/></title>
</head>
<body>
- <h1>PDF-Signaturen</h1>
- <h2>Pr&uuml;fergebnis</h2>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="results.heading2"/></h2>
<%
Iterator resit = results.iterator();
while (resit.hasNext()) {
@@ -28,34 +30,34 @@
<div class="pdfasverticalspace"></div>
<fieldset class="pdfasresultfieldset">
- <legend><b>Signatur-Check</b></legend>
+ <legend><b><fmt:message key="results.signaturecheck"/></b></legend>
<div class="<%= "0".equals(result.getSignatureCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getSignatureCheckInfo() %></div>
</fieldset>
<div class="pdfassmallverticalspace"></div>
<fieldset class="pdfasresultfieldset">
- <legend><b>Zertifikat</b></legend>
+ <legend><b><fmt:message key="results.certificatecheck"/></b></legend>
<table class="pdfaslisttable" cellpadding="1" cellspacing="1">
- <tr><td class="pdfascaption">Signator:</td><td class="pdfasvalue"><%= result.getX509SubjectName() %></td></tr>
- <tr><td class="pdfascaption">Aussteller:</td><td class="pdfasvalue"><%= result.getX509IssuerName() %></td></tr>
- <tr><td class="pdfascaption">Seriennummer:</td><td class="pdfasvalue"><%= result.getX509SerialNumber() %></td></tr>
+ <tr><td class="pdfascaption"><fmt:message key="results.signer"/>:</td><td class="pdfasvalue"><%= result.getX509SubjectName() %></td></tr>
+ <tr><td class="pdfascaption"><fmt:message key="results.issuer"/>:</td><td class="pdfasvalue"><%= result.getX509IssuerName() %></td></tr>
+ <tr><td class="pdfascaption"><fmt:message key="results.serialnumber"/>:</td><td class="pdfasvalue"><%= result.getX509SerialNumber() %></td></tr>
<%
List public_properties = result.getPublicProperties();
Iterator propit = public_properties.iterator();
while (propit.hasNext()) {
String public_property = (String) propit.next();
%>
- <tr><td class="pdfascaption">Eigenschaft:</td><td class="pdfasvalue"><%= public_property %></td></tr>
+ <tr><td class="pdfascaption"><fmt:message key="results.property"/>:</td><td class="pdfasvalue"><%= public_property %></td></tr>
<%
}
%>
- <tr><td class="pdfascaption">Zertifikat:</td><td class="<%= "0".equals(result.getCertificateCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getCertificateCheckInfo() %></td></tr>
+ <tr><td class="pdfascaption"><fmt:message key="results.certificate"/>:</td><td class="<%= "0".equals(result.getCertificateCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getCertificateCheckInfo() %></td></tr>
</table>
</fieldset>
<div class="pdfassmallverticalspace"></div>
<fieldset class="pdfasresultfieldset">
- <legend><b>Manifest-Check</b></legend>
+ <legend><b><fmt:message key="results.manifestcheck"/></b></legend>
<div class="<%= "0".equals(result.getSignatureManifestCheckCode()) ? "pdfasok" : "pdfasnok" %>"><%= result.getSignatureManifestCheckInfo() %></div>
</fieldset>
@@ -69,10 +71,10 @@
%>
<div class="pdfasverticalspace"></div>
<% if (backbutton) { %>
- <a href="<%= request.getContextPath() %>/jsp/verifyupload.jsp">zur&uuml;ck</a>
+ <a href="<%= request.getContextPath() %>/jsp/verifyupload.jsp"><fmt:message key="common.back"/></a>
<% } %>
<% if (btlurl != null) { %>
- <a href="<%=btlurl%>">zur&uuml;ck zur Liste</a>
+ <a href="<%=btlurl%>"><fmt:message key="common.backtolist"/></a>
<% } %>
</body>
</html>
diff --git a/src/main/webapp/jsp/signpreview.jsp b/src/main/webapp/jsp/signpreview.jsp
index ee97497..66a9f69 100644
--- a/src/main/webapp/jsp/signpreview.jsp
+++ b/src/main/webapp/jsp/signpreview.jsp
@@ -3,9 +3,11 @@
<%@ page import="at.knowcenter.wag.egov.egiz.sig.SignatureData" %>
<%@ page import="at.gv.egiz.pdfas.web.SignSessionInformation" %>
<%@ page import="at.gv.egiz.pdfas.impl.input.TextDataSourceImpl"%>
-<%@page import="org.apache.commons.lang.StringEscapeUtils"%>
+<%@ page import="org.apache.commons.lang.StringEscapeUtils"%>
<%@ page import="at.gv.egiz.pdfas.api.commons.Constants" %>
+<%@ include file="language.jsp" %>
+
<%
SignSessionInformation si = (SignSessionInformation) session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION);
@@ -25,12 +27,12 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>PDF-Signaturen Vorschau</title>
+ <title><fmt:message key="signpreview.title"/></title>
</head>
<body>
- <h1>PDF-Signaturen</h1>
- <h2>Vorschau: Dokument Signieren</h2>
+ <h1><fmt:message key="common.title"/></h1>
+ <h2><fmt:message key="signpreview.heading2"/></h2>
<%
if (si.mode.equals(FormFields.VALUE_MODE_TEXTUAL)) {
%>
@@ -42,15 +44,19 @@
<iframe src="bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
<!-- ================================================ Stop BKU-Erkennung -->
</div>
+ <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(si.connector)) { %>
+ <div>
+ <img src="images/chiperling.jpg" width="57" height="57" alt="<fmt:message key="common.mocca"/>"/>
+ </div>
<% } // end if %>
- <input type="submit" value="Signieren..." />
+ <input type="submit" value="<fmt:message key="signpreview.button.sign"/>" />
</form>
<%
} else {
%>
<div class="pdfasverticalspace"></div>
<form action="<%= signature_data_url %>" method="get" target="blank_">
- <input type="submit" value="Vorschaudokument anzeigen..." />
+ <input type="submit" value="<fmt:message key="signpreview.showpreview"/>" />
</form>
<div class="pdfasverticalspace"></div>
<% if (Constants.SIGNATURE_DEVICE_BKU.equals(si.connector)) { %>
@@ -59,15 +65,19 @@
<iframe src="bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
<!-- ================================================ Stop BKU-Erkennung -->
</div>
+ <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(si.connector)) { %>
+ <div>
+ <img src="images/chiperling.jpg" width="57" height="57" alt="<fmt:message key="common.mocca"/>"/>
+ </div>
<% } // end if %>
<form action="<%= submit_url %>" method="get">
- <input type="submit" value="Signieren..." />
+ <input type="submit" value="<fmt:message key="signpreview.button.sign"/>" />
</form>
<%
}
%>
<div class="pdfasverticalspace"></div>
- <a href="<%= request.getContextPath() %>/">zur&uuml;ck</a>
+ <a href="<%= request.getContextPath() %>/"><fmt:message key="common.back"/></a>
</body>
</html>
diff --git a/src/main/webapp/jsp/signupload.jsp b/src/main/webapp/jsp/signupload.jsp
index 3db3be5..287afb1 100644
--- a/src/main/webapp/jsp/signupload.jsp
+++ b/src/main/webapp/jsp/signupload.jsp
@@ -1,78 +1,180 @@
<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %>
<%@ page import="at.knowcenter.wag.egov.egiz.web.SessionAttributes" %>
<%@ 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"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ include file="language.jsp" %>
+
<html>
<head>
- <title>PDF-Signaturen</title>
+ <%
+ boolean testMode = request.getContextPath().startsWith("/test-");
+ boolean forceTextualForMocca = true;
+ %>
+ <title>
+ <%
+ if (testMode) {
+ %>
+ <fmt:message key="test.common.title"/>
+ <% } else { %>
+ <fmt:message key="common.title"/>
+ <% } // end if %>
+ </title>
<% session.removeAttribute(SessionAttributes.SIGNED_PDF_DOCUMENT); %>
+ <script language="javascript" type="text/javascript">
+ <!--
+ function updateForm() {
+ var updateform = document.getElementById('updateform');
+ 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.submit();
+ return(false);
+ }
+ function submitForm(preview) {
+ var submitform = document.getElementById('submitform');
+ if (!submitform.fileupload.value) {
+ if (preview) {
+ alert('<fmt:message key="signupload.documentnotselected.preview"/>');
+ } else {
+ alert('<fmt:message key="signupload.documentnotselected"/>');
+ }
+ return(false);
+ }
+ if (preview) {
+ submitform.<%= FormFields.FIELD_PREVIEW %>.value='true';
+ } else {
+ submitform.<%= FormFields.FIELD_PREVIEW %>.value='false';
+ }
+ return(true);
+ }
+ -->
+ </script>
+ <%
+ String device = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY);
+ if (device == null) {
+ device = Constants.SIGNATURE_DEVICE_MOC;
+ session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_DEVICE_KEY, device);
+ }
+ String mode = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY);
+ if (forceTextualForMocca && Constants.SIGNATURE_DEVICE_MOC.equals(device)) {
+ mode = FormFields.VALUE_MODE_TEXTUAL;
+ session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY, mode);
+ }
+ if (mode == null) {
+ mode = FormFields.VALUE_MODE_TEXTUAL;
+ session.setAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_MODE_KEY, mode);
+ }
+ String type = (String) session.getAttribute(UpdateFormServlet.UPLOADFORM_SIGNATURE_TYPE_KEY);
+ if (type == null) {
+ Locale locale = (Locale) session.getAttribute(LocaleParamFilter.LOCALE_SESSION_KEY);
+ 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);
+ }
+
+ %>
</head>
<body>
-<h1>PDF-Signaturen</h1>
-<h2>Dokument Signatur erstellen</h2>
-<div class="pdfasnote">Bitte w&auml;hlen Sie die zu signierende PDF-Datei. Diese wird mit Ihrer B&uuml;rgerkarte signiert.</div>
-<form name="submitform"
+<h1>
+ <%
+ if (testMode) {
+ %>
+ <fmt:message key="test.common.title"/>
+ <% } else { %>
+ <fmt:message key="common.title"/>
+ <% } // end if %>
+</h1>
+<h2><fmt:message key="signupload.heading2"/></h2>
+<div class="pdfasnote"><fmt:message key="signupload.selectfilenote"/></div>
+<form name="updateform" id="updateform" method="post" action="<%= request.getContextPath() %>/UpdateForm">
+ <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=""/>
+</form>
+<form name="submitform" id="submitform"
enctype="multipart/form-data"
accept-charset="UTF-8"
method="post"
action="<%= request.getContextPath() %>/Sign">
<table border="0" cellspacing="0" cellpadding="4" id="pdfasupperformtable">
<tr>
- <td nowrap="nowrap"><label>PDF Datei:</label></td>
- <td><input size="50" type="file" name="<%= FormFields.FIELD_UPLOAD %>" accept="application/pdf"/></td>
- </tr>
- <tr>
- <td nowrap="nowrap"><label>Signatur Typ:</label></td>
+ <td nowrap="nowrap"><label><fmt:message key="signupload.signaturetype"/>:</label></td>
<td>
- <select class="field" name="sig_type">
- <option value="SIGNATURBLOCK_DE" selected="selected">Standardsignatur Deutsch</option>
- <option value="SIGNATURBLOCK_EN" >Standardsignatur Englisch</option>
+ <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>
</select>
<!-- %= // FormFields.generateTypeSelectBox() % -->
</td>
</tr>
<tr>
- <td nowrap="nowrap"><label>Signatur Modus:</label></td>
+ <td nowrap="nowrap"><label><fmt:message key="signupload.signaturemode"/>:</label></td>
<td>
- <select name="<%= FormFields.FIELD_MODE %>">
- <option value="<%= FormFields.VALUE_MODE_BINARY %>">bin&auml;r</option>
- <option value="<%= FormFields.VALUE_MODE_TEXTUAL %>" selected="selected">textuell</option>
- <!--
- <option value="<%= FormFields.VALUE_MODE_DETACHED %>">detached</option>
- -->
- </select>
+ <% if (forceTextualForMocca && Constants.SIGNATURE_DEVICE_MOC.equals(device)) {%>
+ <fmt:message key="common.textual"/>
+ <input type="hidden" name="<%= FormFields.FIELD_MODE %>" value="<%= FormFields.VALUE_MODE_TEXTUAL %>"/>
+ <% } else { %>
+ <select name="<%= FormFields.FIELD_MODE %>" onchange="return updateForm();">
+ <option value="<%= FormFields.VALUE_MODE_BINARY %>" <%= FormFields.VALUE_MODE_BINARY.equals(mode) ? "selected=\"selected\"" : "" %>><fmt:message key="common.binary"/></option>
+ <option value="<%= FormFields.VALUE_MODE_TEXTUAL %>" <%= FormFields.VALUE_MODE_TEXTUAL.equals(mode) ? "selected=\"selected\"" : "" %>><fmt:message key="common.textual"/></option>
+ <!--
+ <option value="<%= FormFields.VALUE_MODE_DETACHED %>">detached</option>
+ -->
+ </select>
+ <% } %>
</td>
</tr>
<tr>
- <td nowrap="nowrap"><label>Signaturger&auml;t:</label></td>
+ <td nowrap="nowrap"><label><fmt:message key="signupload.signaturedevice"/>:</label></td>
<td>
- <select name="connector">
- <option value="<%= Constants.SIGNATURE_DEVICE_BKU %>">BKU</option>
- <option value="<%= Constants.SIGNATURE_DEVICE_MOC %>" selected="selected">MOCCA</option>
+ <select name="<%= FormFields.FIELD_CONNECTOR %>" onchange="return updateForm();">
+ <option value="<%= Constants.SIGNATURE_DEVICE_BKU %>" <%= Constants.SIGNATURE_DEVICE_BKU.equals(device) ? "selected=\"selected\"" : "" %>><fmt:message key="common.bku"/></option>
+ <option value="<%= Constants.SIGNATURE_DEVICE_MOC %>" <%= Constants.SIGNATURE_DEVICE_MOC.equals(device) ? "selected=\"selected\"" : "" %>><fmt:message key="common.mocca"/></option>
</select>
</td>
</tr>
+ <tr>
+ <td nowrap="nowrap"><label><fmt:message key="signupload.file"/>:</label></td>
+ <td><input size="50" type="file" id="fileupload" name="<%= FormFields.FIELD_UPLOAD %>" accept="application/pdf"/></td>
+ </tr>
</table>
- <div class="pdfasnote"><span class="pdfasemphasis">Bitte beachten Sie:</span> Im textuellen Modus signierte Dokumente k&ouml;nnen nur dann gepr&uuml;ft werden, wenn das Zertifikat in einem Verzeichnisdienst verf&uuml;gbar ist.</div>
+ <div class="pdfasnote"><span class="pdfasemphasis"><fmt:message key="signupload.note.prefix"/>:</span> <fmt:message key="signupload.note"/></div>
<input type="hidden" name="<%= FormFields.FIELD_DOWNLOAD %>" value="<%= FormFields.VALUE_DOWNLOAD_ATTACHMENT %>"/>
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
<div class="pdfasverticalspace"></div>
- <jsp:include page="SIGNATURBLOCK_DE.jsp"/>
+ <jsp:include page="SIGNATURBLOCK.jsp"/>
- <div class="pdfasnote">Das Erscheinungsbild der Signaturmarke kann abh&auml;ngig vom Signatur Typ, vom Signatur Modus, von der verwendeten B&uuml;rgerkarte, sowie von der verwendeten B&uuml;rgerkartenumgebung variieren.</div>
- <div>
- <!-- =============================================== Start BKU-Erkennung -->
- <iframe src="<%= request.getContextPath() %>/bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
- <!-- ================================================ Stop BKU-Erkennung -->
- </div>
- <input type="submit" value="Signatur erstellen" />
- <input type="submit" value="Vorschau" onclick="document.submitform.<%= FormFields.FIELD_PREVIEW %>.value='true'" />
+ <div class="pdfasnote"><fmt:message key="signupload.noteonsigmark"/></div>
+ <% if (Constants.SIGNATURE_DEVICE_BKU.equals(device)) { %>
+ <div>
+ <!-- =============================================== Start BKU-Erkennung -->
+ <iframe src="<%= request.getContextPath() %>/bku-erkennung/bku-erkennung_iframe.html" width="152" height="57" id="sep_iframe" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" allowtransparency="true"></iframe>
+ <!-- ================================================ Stop BKU-Erkennung -->
+ </div>
+ <% } else if (Constants.SIGNATURE_DEVICE_MOC.equals(device)) { %>
+ <div>
+ <img src="images/chiperling.jpg" width="57" height="57" alt="<fmt:message key="common.mocca"/>"/>
+ </div>
+ <% } else { %>
+ <div class="pdfasverticalspace"></div>
+ <% } // end if %>
+ <div>
+ <input type="submit" value="<fmt:message key="signupload.button.sign"/>" onclick="return submitForm(false);"/>
+ <input type="submit" value="<fmt:message key="signupload.button.preview"/>" onclick="return submitForm(true);"/>
+ </div>
</form>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/main/webapp/jsp/verifylist.jsp b/src/main/webapp/jsp/verifylist.jsp
index fac5755..c04928a 100644
--- a/src/main/webapp/jsp/verifylist.jsp
+++ b/src/main/webapp/jsp/verifylist.jsp
@@ -7,6 +7,7 @@
<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.VerifyPreviewServlet" %>
<%@ page import="at.gv.egiz.pdfas.web.VerifySessionInformation" %>
<%@ page import="at.gv.egiz.pdfas.web.helper.SessionHelper"%>
+<%@ include file="language.jsp" %>
<%
VerifySessionInformation si = (VerifySessionInformation) SessionHelper.getSession(request);
@@ -18,16 +19,16 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
- <title>PDF-Signaturen</title>
+ <title><fmt:message key="common.title"/></title>
</head>
<body>
- <h1>PDF-Signaturen</h1>
+ <h1><fmt:message key="common.title"/></h1>
<%
if (signature_holders.size() > 1) {
%>
- <h2>Dokument Signaturen pr&uuml;fen</h2>
+ <h2><fmt:message key="verifylist.heading2.plural"/></h2>
<% } else { %>
- <h2>Dokument Signatur pr&uuml;fen</h2>
+ <h2><fmt:message key="verifylist.heading2.singular"/></h2>
<%
}
%>
@@ -44,7 +45,7 @@
style="float:left;">
<input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= i %>" />
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
- <input type="submit" value="Nur diese Signatur pr&uuml;fen" />
+ <input type="submit" value="<fmt:message key="verifylist.button.verifysinglesignature"/>" />
</form>
<form action="<%= response.encodeURL(request.getContextPath() + "/VerifyPreview") %>"
accept-charset="UTF-8"
@@ -52,7 +53,7 @@
style="float:left;">
<input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= i %>" />
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="true" />
- <input type="submit" value="Vorschau..." />
+ <input type="submit" value="<fmt:message key="verifylist.button.preview"/>" />
</form>
</div>
<%
@@ -65,9 +66,9 @@
method="get">
<input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= FormFields.VALUE_VERIFY_WHICH_ALL %>" />
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
- <input type="submit" value="Alle pr&uuml;fen" />
+ <input type="submit" value="<fmt:message key="verifylist.button.verifyallsignatures"/>" />
</form>
<div class="pdfasverticalspace"></div>
- <a href="<%= request.getContextPath() %>/jsp/verifyupload.jsp">zur&uuml;ck</a>
+ <a href="<%= request.getContextPath() %>/jsp/verifyupload.jsp"><fmt:message key="common.back"/></a>
</body>
</html>
diff --git a/src/main/webapp/jsp/verifypreview.jsp b/src/main/webapp/jsp/verifypreview.jsp
index 1b0adfa..5b6ae6e 100644
--- a/src/main/webapp/jsp/verifypreview.jsp
+++ b/src/main/webapp/jsp/verifypreview.jsp
@@ -8,6 +8,7 @@
<%@ page import="at.knowcenter.wag.egov.egiz.web.servlets.VerifyPreviewServlet" %>
<%@ page import="at.gv.egiz.pdfas.web.VerifySessionInformation" %>
<%@ page import="at.gv.egiz.pdfas.web.helper.SessionHelper"%>
+<%@ include file="language.jsp" %>
<%
String btlurl = (String)request.getAttribute("btlurl");
@@ -21,7 +22,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>PDF-Signaturen</title>
+ <title><fmt:message key="common.title"/></title>
<script type="text/javascript">
<!--
function initSigValues() {
@@ -31,26 +32,26 @@
</script>
</head>
<body">
-<h1>PDF-Signaturen</h1>
-<h2>Vorschau: Dokument pr&uuml;fen</h2>
+<h1><fmt:message key="common.title"/></h1>
+<h2><fmt:message key="verifypreview.heading2"/></h2>
<form action="<%= response.encodeURL(request.getContextPath() + "/VerifyPreview") %>"
name="submitform"
enctype="multipart/form-data"
accept-charset="UTF-8"
method="post">
<input type="hidden" name="<%= FormFields.FIELD_VERIFY_WHICH %>" value="<%= verify_which %>" />
- <div class="pdfasnote"><label>Rekonstruktion der Signaturmarke:</label></div>
+ <div class="pdfasnote"><label><fmt:message key="verifypreview.reconstruction"/>:</label></div>
<div class="pdfasverticalspace"></div>
<textarea class="pdfaspreviewfield" rows="14" name="<%= FormFields.FIELD_RAW_DOCUMENT_TEXT %>"><%= ((TextualSignatureHolder)signature_holder).getSignedText() %></textarea>
<%= VerifyPreviewServlet.renderRequiredKeys(signature_holder.getSignatureObject(), "", false) %>
<br />
<input type="hidden" name="verify" value="false" />
- <input type="submit" value="Werte &uuml;bernehmen" />
- <input type="submit" value="Werte &uuml;bernehmen und pr&uuml;fen" onclick="document.submitform.verify.value='true'" />
+ <input type="submit" value="<fmt:message key="verifypreview.applyvalues"/>" />
+ <input type="submit" value="<fmt:message key="verifypreview.applyvaluesandverify"/>" onclick="document.submitform.verify.value='true'" />
</form>
<div class="pdfasverticalspace"></div>
-<a href="<%= request.getContextPath() %>/jsp/verifyupload.jsp">zur&uuml;ck</a>
-<a href="<%=btlurl%>">zur&uuml;ck zur Liste</a>
+<a href="<%= request.getContextPath() %>/jsp/verifyupload.jsp"><fmt:message key="common.back"/></a>
+<a href="<%=btlurl%>"><fmt:message key="common.backtolist"/></a>
<script language="javascript" type="text/javascript">
<!--
initSigValues();
diff --git a/src/main/webapp/jsp/verifyupload.jsp b/src/main/webapp/jsp/verifyupload.jsp
index 54823f5..6e2f237 100644
--- a/src/main/webapp/jsp/verifyupload.jsp
+++ b/src/main/webapp/jsp/verifyupload.jsp
@@ -1,24 +1,27 @@
<%@ page import="at.knowcenter.wag.egov.egiz.web.FormFields" %>
<%@ page contentType="text/html; charset=UTF-8" %>
+
+<%@ include file="language.jsp" %>
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>PDF-Signaturen</title>
+ <title><fmt:message key="common.title"/></title>
</head>
<body>
-<h1>PDF-Signaturen</h1>
-<h2>Dokument Signatur pr&uuml;fen</h2>
-<div class="pdfasnote">Hier bitte den vollst&auml;ndigen Dokumenttext samt Signaturblock eingeben.<br/></div>
+<h1><fmt:message key="common.title"/></h1>
+<h2><fmt:message key="verifyupload.heading2"/></h2>
+<div class="pdfasnote"><fmt:message key="verifyupload.note"/><br/></div>
<form name="submitform" enctype="multipart/form-data" method="post" action="<%= request.getContextPath() %>/Verify" accept-charset="UTF-8">
<textarea class="pdfaspreviewfield" rows="14" name="<%= FormFields.FIELD_UPLOAD %>"></textarea>
<table border="0" cellspacing="0" cellpadding="4" id="pdfasupperformtable">
<tr>
- <td nowrap="nowrap"><label>Pr&uuml;f Applikation:</label></td>
+ <td nowrap="nowrap"><label><fmt:message key="verifyupload.verifydevice"/>:</label></td>
<td><%= FormFields.generateConnectorSelectBox() %></td>
</tr>
<tr>
- <td nowrap="nowrap"><label>Pr&uuml;f Modus:</label></td>
- <td><span>textuell</span></td>
+ <td nowrap="nowrap"><label><fmt:message key="verifyupload.verifymode"/>:</label></td>
+ <td><span><fmt:message key="common.textual"/></span></td>
</tr>
</table>
@@ -28,11 +31,11 @@
<!-- ================================================ Stop BKU-Erkennung -->
</div>
<input type="hidden" name="<%= FormFields.FIELD_PREVIEW %>" value="false" />
- <input type="submit" value="Alle pr&uuml;fen" />
- <input type="submit" value="Signaturen auflisten" onclick="document.submitform.<%= FormFields.FIELD_PREVIEW %>.value='true'" />
+ <input type="submit" value="<fmt:message key="verifyupload.button.verifyallsignatures"/>" />
+ <input type="submit" value="<fmt:message key="verifyupload.button.listsignatures"/>" onclick="document.submitform.<%= FormFields.FIELD_PREVIEW %>.value='true'" />
</form>
<div class="pdfasverticalspace"></div>
-<a href="<%= request.getContextPath() %>/">zur&uuml;ck</a>
+<a href="<%= request.getContextPath() %>/"><fmt:message key="common.back"/></a>
</body>
</html> \ No newline at end of file
diff --git a/src/main/webapp/sitemesh/buergerkarte/pdf-as-template-de.jsp b/src/main/webapp/sitemesh/buergerkarte/pdf-as-template-de.jsp
new file mode 100644
index 0000000..c3838f5
--- /dev/null
+++ b/src/main/webapp/sitemesh/buergerkarte/pdf-as-template-de.jsp
@@ -0,0 +1,140 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+
+<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><!-- InstanceBegin template="/Templates/pdf.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="description" content="B&uuml;rgerkarte" />
+<meta name="keywords" content="b&uuml;rgerkarte,e-card,pdf signatur" />
+<meta name="robots" content="index,follow" />
+<meta name="language" content="de-at" />
+<meta name="author" content="Tina Fleck" />
+<meta name="geo.region" content="AT-6" />
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>PDF-Signaturen</title>
+<decorator:head/>
+<link rel="stylesheet" type="text/css" href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/css/pdfas-styles.css" />
+<!-- InstanceEndEditable -->
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/css/styles.css" />
+<!-- Template Parameters -->
+
+
+
+
+
+
+
+
+
+
+<!-- InstanceParam name="zusatzspalte" type="boolean" value="true" -->
+<!-- InstanceParam name="contentwidth" type="number" value="700" -->
+
+<!-- InstanceParam name="submenu_1" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_2" type="text" value="entry-active" -->
+<!-- InstanceParam name="submenu_3" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_4" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_5" type="text" value="entry" -->
+
+
+
+
+</head>
+
+<body>
+ <div id="container">
+ <div id="header">
+ <div id="sitename">B&uuml;rgerkarte</div>
+ <div id="metamenu"><a href="/de/index.html">Home</a> | <a href="/de/sitemap/index.html">Sitemap</a> | <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/?locale=en">English</a> |<!-- <a href="/switch.php">English</a> | --> <a href="/de/impressum/">Impressum</a></div>
+ <div class="clearfloat"></div>
+ </div>
+
+ <div id="menubar">
+ <div id="menu-top"></div>
+ <div id="menu-middle">
+ <h4>Ich will eine...</h4>
+ <!-- menu_inactive -->
+ <div><a id="menu_11" class="menu_inactive" href="/de/voraussetzungen/index.html">Ich ben&ouml;tige dazu ...</a></div>
+ <div><a id="menu_12" class="menu_inactive" href="/de/aktivieren/online.html">Jetzt aktivieren ...</a></div>
+ <h4>Ich habe eine...</h4>
+ <div><a id="menu_21" class="menu_inactive" href="/de/verwaltung/index.html">&Ouml;ffentliche Verwaltung</a></div>
+ <div><a id="menu_22" class="menu_inactive" href="/de/privatwirtschaft/index.html">Privatwirtschaft</a></div>
+ <div><a id="menu_23" class="menu_inactive" href="/de/zuhause/index.html">Zu Hause</a></div>
+ <div><a id="menu_25" class="menu_active" href="/de/pdf-signieren/index.html"><acronym title="Portable Document Format" lang="en">PDF</acronym> Signaturen</a></div>
+ <div><a id="menu_24" class="menu_inactive" href="/de/hilfe/wer-hilft-mir.html">Hilfe bei Problemen</a></div>
+ <h4>Was ist sie...</h4>
+ <div><a id="menu_31" class="menu_inactive" href="/de/ueberblick/index.html">&Uuml;berblick B&uuml;rgerkarte</a></div>
+ <div><a id="menu_32" class="menu_inactive" href="/de/datenschutz-sicherheit/index.html">Datenschutz &amp; Sicherheit</a></div>
+ <div><a id="menu_33" class="menu_inactive" href="/de/spezifikation/index.html">Spezifikation</a></div>
+ <!--
+ <div><a id="menu_11" class="menu_inactive" href="/de/begriffslexikon/index.html">Begriffslexikon</a></div>
+ -->
+ <div><img src="images/menu-divider.jpg" alt="" width="210" height="2" /></div>
+
+
+ <div class="search">
+ <form accept-charset="utf-8" action="/regain/search.jsp" method="get" name="search">
+ <table cellpadding="0" cellspacing="0" border="0"><tr><td><label for="suchtext">Suche: <input name="query" type="text" size="20" maxlength="20" alt="search" class="inputfield" /></label></td>
+ <td><input type="image" name="enterdata" src="images/button-search.jpg" alt="Suche starten" title="Suche starten" /></td>
+ </tr></table>
+ </form>
+ </div>
+ </div>
+ <div id="menu-bottom"></div>
+ </div>
+
+
+
+
+
+
+
+
+
+
+ <div id="mainContent-700">
+
+ <div class="submenu" id="_700">
+
+ <!-- InstanceBeginEditable name="optional-entries-700" -->
+ <!-- InstanceEndEditable -->
+ <div class="start"></div>
+ <div class="entry">
+ <a href="/de/pdf-signieren/index.html">Allgemein</a></div>
+ <div class="entry">
+ <a href="/de/pdf-signieren/info.html">Weitere Info</a></div>
+ <div class="entry-active">
+ <a href="<%= request.getContextPath() %>/?locale=de"><acronym title="Portable Document Format" lang="en">PDF</acronym> Signieren</a></div>
+ <div class="entry">
+ <a href="/signature-verification/?locale=de">Signatur &uuml;berpr&uuml;fen</a></div>
+ <div class="entry">
+ <a href="/download/pdftools/index.html">Download</a></div>
+ <div class="clear"></div>
+
+ </div>
+
+
+ <!-- Start Content -->
+ <!-- InstanceBeginEditable name="Content-700" -->
+ <div id="content-middle-700">
+ <decorator:body/>
+ </div>
+ <!-- InstanceEndEditable -->
+ <div id="content-bottom-700"></div>
+ </div>
+ </div>
+
+
+
+
+
+</body>
+<!-- InstanceEnd --></html>
diff --git a/src/main/webapp/sitemesh/buergerkarte/pdf-as-template.jsp b/src/main/webapp/sitemesh/buergerkarte/pdf-as-template.jsp
new file mode 100644
index 0000000..02868f3
--- /dev/null
+++ b/src/main/webapp/sitemesh/buergerkarte/pdf-as-template.jsp
@@ -0,0 +1,160 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+
+<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><!-- InstanceBegin template="/Templates/en/pdf.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="description" content="citizen card" />
+<meta name="keywords" content="citizen card,e-card,pdf signature" />
+<meta name="robots" content="index,follow" />
+<meta name="language" content="en-us" />
+<meta name="author" content="Tina Fleck" />
+<meta name="geo.region" content="AT-6" />
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>PDF Signature</title>
+<decorator:head/>
+<link rel="stylesheet" type="text/css" href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/css/pdfas-styles.css" />
+<!-- InstanceEndEditable -->
+<!-- InstanceBeginEditable name="templates" -->
+<!-- InstanceEndEditable -->
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/css/styles.css" />
+<!-- Template Parameters -->
+
+
+
+
+
+
+
+
+
+
+<!-- InstanceParam name="zusatzspalte" type="boolean" value="true" -->
+<!-- InstanceParam name="contentwidth" type="number" value="700" -->
+
+<!-- InstanceParam name="submenu_1" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_2" type="text" value="entry-active" -->
+<!-- InstanceParam name="submenu_3" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_4" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_5" type="text" value="entry" -->
+
+
+
+
+
+<!-- InstanceParam name="test_prefix" type="text" value="" -->
+<!-- InstanceParam name="test_postfix" type="text" value="" -->
+
+<!-- InstanceBeginEditable name="JavaScript" -->
+<!-- Java Script Area -->
+<%
+ String localName = request.getLocalName();
+ if (localName.equals("localhost") || localName.startsWith("brontes.")) {
+%>
+ <link rel="stylesheet" type="text/css" href="http://www.buergerkarte.at/css/styles.css" />
+<%
+ } // end if
+%>
+<!-- InstanceEndEditable -->
+
+</head>
+
+<body>
+ <div id="container">
+ <div id="header">
+ <div id="sitename">Citizen Card</div>
+ <div id="metamenu"><a href="/en/index.html">Home</a> | <a href="/en/sitemap/index.html">Sitemap</a> | <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/?locale=de">German</a> |<!-- <a href="../switch.php">English</a> | --> <a href="/en/impressum">Imprint</a></div>
+ <div class="clearfloat"></div>
+ </div>
+
+ <div id="menubar">
+ <div id="menu-top"></div>
+ <div id="menu-middle">
+ <h4>I want one...</h4>
+ <!-- menu_inactive -->
+ <div><a id="menu_11" class="menu_inactive" href="/en/voraussetzungen/index.html">What you'll need ...</a></div>
+ <div><a id="menu_12" class="menu_inactive" href="/en/aktivieren/online.html">Activate your card ...</a></div>
+ <h4>I have one...</h4>
+ <div><a id="menu_21" class="menu_inactive" href="/en/verwaltung/index.html">Public Administration</a></div>
+ <div><a id="menu_22" class="menu_inactive" href="/en/privatwirtschaft/index.html">Private Sector</a></div>
+ <div><a id="menu_23" class="menu_inactive" href="/en/zuhause/index.html">At Home</a></div>
+ <div><a id="menu_25" class="menu_active" href="/en/pdf-signieren/index.html"><acronym title="Portable Document Format">PDF</acronym> Signatures</a></div>
+ <div><a id="menu_24" class="menu_inactive" href="/en/hilfe/wer-hilft-mir.html">Help</a></div>
+ <h4>What is it...</h4>
+ <div><a id="menu_31" class="menu_inactive" href="/en/ueberblick/index.html">Overview</a></div>
+ <div><a id="menu_32" class="menu_inactive" href="/en/datenschutz-sicherheit/index.html">Data Protection
+&amp; Security</a></div>
+ <div><a id="menu_33" class="menu_inactive" href="/en/spezifikation/index.html">Specifications</a></div>
+ <!--
+ <div><a id="menu_11" class="menu_inactive" href="../de/begriffslexikon/index.html">Begriffslexikon</a></div>
+ -->
+ <div><img src="images/menu-divider.jpg" alt="" width="210" height="2" /></div>
+
+
+ <div class="search">
+ <form accept-charset="utf-8" action="/regain/search.jsp" method="get" name="search">
+ <table cellpadding="0" cellspacing="0" border="0"><tr><td><label for="suchtext">Search:
+ <input name="query" type="text" size="20" maxlength="20" alt="search" class="inputfield" /></label></td>
+ <td><input type="image" name="enterdata" src="images/button-search.jpg" alt="Suche starten" title="Suche starten" /></td>
+ </tr></table>
+ </form>
+ </div>
+ </div>
+ <div id="menu-bottom"></div>
+ </div>
+
+
+
+
+
+
+
+
+
+
+ <div id="mainContent-700">
+
+ <div class="submenu" id="_700">
+
+ <!-- InstanceBeginEditable name="optional-entries-700" -->
+ <!-- InstanceEndEditable -->
+ <div class="start"></div>
+ <div class="entry">
+ <a href="/en/pdf-signieren/index.html">General</a></div>
+ <div class="entry">
+ <a href="/en/pdf-signieren/info.html">Additional Info</a></div>
+ <div class="entry-active">
+ <a href="<%= request.getContextPath() %>/?locale=en"><acronym title="Portable Document Format" lang="en">PDF</acronym> Signatures</a></div>
+ <div class="entry">
+ <a href="/signature-verification/?locale=en">Signature Verification</a></div>
+ <div class="entry">
+ <a href="/en/pdf-signieren/downloads.html">Downloads</a></div>
+ <div class="clear"></div>
+
+ </div>
+
+
+ <!-- Start Content -->
+ <!-- InstanceBeginEditable name="Content-700" -->
+ <div id="content-middle-700">
+ <decorator:body/>
+ </div>
+ <!-- InstanceEndEditable -->
+ <div id="content-bottom-700"></div>
+ </div>
+ </div>
+
+
+
+
+
+</body>
+<!-- InstanceEnd --></html>
diff --git a/src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template-de.jsp b/src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template-de.jsp
new file mode 100644
index 0000000..bae6f6c
--- /dev/null
+++ b/src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template-de.jsp
@@ -0,0 +1,140 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+
+<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><!-- InstanceBegin template="/Templates/pdf.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="description" content="B&uuml;rgerkarte" />
+<meta name="keywords" content="b&uuml;rgerkarte,e-card,pdf signatur" />
+<meta name="robots" content="index,follow" />
+<meta name="language" content="de-at" />
+<meta name="author" content="Tina Fleck" />
+<meta name="geo.region" content="AT-6" />
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>PDF-Signatur (Test)</title>
+<decorator:head/>
+<link rel="stylesheet" type="text/css" href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/css/pdfas-styles.css" />
+<!-- InstanceEndEditable -->
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/css/styles.css" />
+<!-- Template Parameters -->
+
+
+
+
+
+
+
+
+
+
+<!-- InstanceParam name="zusatzspalte" type="boolean" value="true" -->
+<!-- InstanceParam name="contentwidth" type="number" value="700" -->
+
+<!-- InstanceParam name="submenu_1" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_2" type="text" value="entry-active" -->
+<!-- InstanceParam name="submenu_3" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_4" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_5" type="text" value="entry" -->
+
+
+
+
+</head>
+
+<body>
+ <div id="container">
+ <div id="header">
+ <div id="sitename">B&uuml;rgerkarte</div>
+ <div id="metamenu"><a href="/de/index.html">Home</a> | <a href="/de/sitemap/index.html">Sitemap</a> | <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/?locale=en">English</a> |<!-- <a href="/switch.php">English</a> | --> <a href="/de/impressum/">Impressum</a></div>
+ <div class="clearfloat"></div>
+ </div>
+
+ <div id="menubar">
+ <div id="menu-top"></div>
+ <div id="menu-middle">
+ <h4>Ich will eine...</h4>
+ <!-- menu_inactive -->
+ <div><a id="menu_11" class="menu_inactive" href="/de/voraussetzungen/index.html">Ich ben&ouml;tige dazu ...</a></div>
+ <div><a id="menu_12" class="menu_inactive" href="/de/aktivieren/online.html">Jetzt aktivieren ...</a></div>
+ <h4>Ich habe eine...</h4>
+ <div><a id="menu_21" class="menu_inactive" href="/de/verwaltung/index.html">&Ouml;ffentliche Verwaltung</a></div>
+ <div><a id="menu_22" class="menu_inactive" href="/de/privatwirtschaft/index.html">Privatwirtschaft</a></div>
+ <div><a id="menu_23" class="menu_inactive" href="/de/zuhause/index.html">Zu Hause</a></div>
+ <div><a id="menu_25" class="menu_active" href="/de/pdf-signieren/index.html"><acronym title="Portable Document Format" lang="en">PDF</acronym> Signaturen</a></div>
+ <div><a id="menu_24" class="menu_inactive" href="/de/hilfe/wer-hilft-mir.html">Hilfe bei Problemen</a></div>
+ <h4>Was ist sie...</h4>
+ <div><a id="menu_31" class="menu_inactive" href="/de/ueberblick/index.html">&Uuml;berblick B&uuml;rgerkarte</a></div>
+ <div><a id="menu_32" class="menu_inactive" href="/de/datenschutz-sicherheit/index.html">Datenschutz &amp; Sicherheit</a></div>
+ <div><a id="menu_33" class="menu_inactive" href="/de/spezifikation/index.html">Spezifikation</a></div>
+ <!--
+ <div><a id="menu_11" class="menu_inactive" href="/de/begriffslexikon/index.html">Begriffslexikon</a></div>
+ -->
+ <div><img src="images/menu-divider.jpg" alt="" width="210" height="2" /></div>
+
+
+ <div class="search">
+ <form accept-charset="utf-8" action="/regain/search.jsp" method="get" name="search">
+ <table cellpadding="0" cellspacing="0" border="0"><tr><td><label for="suchtext">Suche: <input name="query" type="text" size="20" maxlength="20" alt="search" class="inputfield" /></label></td>
+ <td><input type="image" name="enterdata" src="images/button-search.jpg" alt="Suche starten" title="Suche starten" /></td>
+ </tr></table>
+ </form>
+ </div>
+ </div>
+ <div id="menu-bottom"></div>
+ </div>
+
+
+
+
+
+
+
+
+
+
+ <div id="mainContent-700">
+
+ <div class="submenu" id="_700">
+
+ <!-- InstanceBeginEditable name="optional-entries-700" -->
+ <!-- InstanceEndEditable -->
+ <div class="start"></div>
+ <div class="entry">
+ <a href="/de/pdf-signieren/index.html">Allgemein</a></div>
+ <div class="entry">
+ <a href="/de/pdf-signieren/info.html">Weitere Info</a></div>
+ <div class="entry-active">
+ <a href="<%= request.getContextPath() %>/?locale=de"><acronym title="Portable Document Format" lang="en">PDF</acronym> Signieren (Test)</a></div>
+ <div class="entry">
+ <a href="/test-signature-verification/?locale=de">Signatur &uuml;berpr&uuml;fen (Test)</a></div>
+ <div class="entry">
+ <a href="/download/pdftools/index.html">Download</a></div>
+ <div class="clear"></div>
+
+ </div>
+
+
+ <!-- Start Content -->
+ <!-- InstanceBeginEditable name="Content-700" -->
+ <div id="content-middle-700">
+ <decorator:body/>
+ </div>
+ <!-- InstanceEndEditable -->
+ <div id="content-bottom-700"></div>
+ </div>
+ </div>
+
+
+
+
+
+</body>
+<!-- InstanceEnd --></html>
diff --git a/src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template.jsp b/src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template.jsp
new file mode 100644
index 0000000..c480315
--- /dev/null
+++ b/src/main/webapp/sitemesh/buergerkarte/test-pdf-as-template.jsp
@@ -0,0 +1,160 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
+<%@taglib prefix="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
+<%@taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
+
+<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
+<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
+
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><!-- InstanceBegin template="/Templates/en/pdf.dwt" codeOutsideHTMLIsLocked="false" -->
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="description" content="citizen card" />
+<meta name="keywords" content="citizen card,e-card,pdf signature" />
+<meta name="robots" content="index,follow" />
+<meta name="language" content="en-us" />
+<meta name="author" content="Tina Fleck" />
+<meta name="geo.region" content="AT-6" />
+<!-- InstanceBeginEditable name="doctitle" -->
+<title>PDF Signature (test)</title>
+<decorator:head/>
+<link rel="stylesheet" type="text/css" href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/css/pdfas-styles.css" />
+<!-- InstanceEndEditable -->
+<!-- InstanceBeginEditable name="templates" -->
+<!-- InstanceEndEditable -->
+<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="icon" href="/favicon.ico" type="image/x-icon" />
+<link rel="stylesheet" type="text/css" href="https://www.buergerkarte.at/css/styles.css" />
+<!-- Template Parameters -->
+
+
+
+
+
+
+
+
+
+
+<!-- InstanceParam name="zusatzspalte" type="boolean" value="true" -->
+<!-- InstanceParam name="contentwidth" type="number" value="700" -->
+
+<!-- InstanceParam name="submenu_1" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_2" type="text" value="entry-active" -->
+<!-- InstanceParam name="submenu_3" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_4" type="text" value="entry" -->
+<!-- InstanceParam name="submenu_5" type="text" value="entry" -->
+
+
+
+
+
+<!-- InstanceParam name="test_prefix" type="text" value="" -->
+<!-- InstanceParam name="test_postfix" type="text" value="" -->
+
+<!-- InstanceBeginEditable name="JavaScript" -->
+<!-- Java Script Area -->
+<%
+ String localName = request.getLocalName();
+ if (localName.equals("localhost") || localName.startsWith("brontes.")) {
+%>
+ <link rel="stylesheet" type="text/css" href="http://www.buergerkarte.at/css/styles.css" />
+<%
+ } // end if
+%>
+<!-- InstanceEndEditable -->
+
+</head>
+
+<body>
+ <div id="container">
+ <div id="header">
+ <div id="sitename">Citizen Card</div>
+ <div id="metamenu"><a href="/en/index.html">Home</a> | <a href="/en/sitemap/index.html">Sitemap</a> | <a href="<%=LocalRequestHelper.getLocalContextAddress(request,response)%>/?locale=de">German</a> |<!-- <a href="../switch.php">English</a> | --> <a href="/en/impressum">Imprint</a></div>
+ <div class="clearfloat"></div>
+ </div>
+
+ <div id="menubar">
+ <div id="menu-top"></div>
+ <div id="menu-middle">
+ <h4>I want one...</h4>
+ <!-- menu_inactive -->
+ <div><a id="menu_11" class="menu_inactive" href="/en/voraussetzungen/index.html">What you'll need ...</a></div>
+ <div><a id="menu_12" class="menu_inactive" href="/en/aktivieren/online.html">Activate your card ...</a></div>
+ <h4>I have one...</h4>
+ <div><a id="menu_21" class="menu_inactive" href="/en/verwaltung/index.html">Public Administration</a></div>
+ <div><a id="menu_22" class="menu_inactive" href="/en/privatwirtschaft/index.html">Private Sector</a></div>
+ <div><a id="menu_23" class="menu_inactive" href="/en/zuhause/index.html">At Home</a></div>
+ <div><a id="menu_25" class="menu_active" href="/en/pdf-signieren/index.html"><acronym title="Portable Document Format">PDF</acronym> Signatures</a></div>
+ <div><a id="menu_24" class="menu_inactive" href="/en/hilfe/wer-hilft-mir.html">Help</a></div>
+ <h4>What is it...</h4>
+ <div><a id="menu_31" class="menu_inactive" href="/en/ueberblick/index.html">Overview</a></div>
+ <div><a id="menu_32" class="menu_inactive" href="/en/datenschutz-sicherheit/index.html">Data Protection
+&amp; Security</a></div>
+ <div><a id="menu_33" class="menu_inactive" href="/en/spezifikation/index.html">Specifications</a></div>
+ <!--
+ <div><a id="menu_11" class="menu_inactive" href="../de/begriffslexikon/index.html">Begriffslexikon</a></div>
+ -->
+ <div><img src="images/menu-divider.jpg" alt="" width="210" height="2" /></div>
+
+
+ <div class="search">
+ <form accept-charset="utf-8" action="/regain/search.jsp" method="get" name="search">
+ <table cellpadding="0" cellspacing="0" border="0"><tr><td><label for="suchtext">Search:
+ <input name="query" type="text" size="20" maxlength="20" alt="search" class="inputfield" /></label></td>
+ <td><input type="image" name="enterdata" src="images/button-search.jpg" alt="Suche starten" title="Suche starten" /></td>
+ </tr></table>
+ </form>
+ </div>
+ </div>
+ <div id="menu-bottom"></div>
+ </div>
+
+
+
+
+
+
+
+
+
+
+ <div id="mainContent-700">
+
+ <div class="submenu" id="_700">
+
+ <!-- InstanceBeginEditable name="optional-entries-700" -->
+ <!-- InstanceEndEditable -->
+ <div class="start"></div>
+ <div class="entry">
+ <a href="/en/pdf-signieren/index.html">General</a></div>
+ <div class="entry">
+ <a href="/en/pdf-signieren/info.html">Additional Info</a></div>
+ <div class="entry-active">
+ <a href="<%= request.getContextPath() %>/?locale=en"><acronym title="Portable Document Format" lang="en">PDF</acronym> Signatures (test)</a></div>
+ <div class="entry">
+ <a href="/test-signature-verification/?locale=en">Signature Verification (test)</a></div>
+ <div class="entry">
+ <a href="/en/pdf-signieren/downloads.html">Downloads</a></div>
+ <div class="clear"></div>
+
+ </div>
+
+
+ <!-- Start Content -->
+ <!-- InstanceBeginEditable name="Content-700" -->
+ <div id="content-middle-700">
+ <decorator:body/>
+ </div>
+ <!-- InstanceEndEditable -->
+ <div id="content-bottom-700"></div>
+ </div>
+ </div>
+
+
+
+
+
+</body>
+<!-- InstanceEnd --></html>
diff --git a/src/main/webapp/sitemesh/standalone.jsp b/src/main/webapp/sitemesh/standalone.jsp
index 691857f..f87766b 100644
--- a/src/main/webapp/sitemesh/standalone.jsp
+++ b/src/main/webapp/sitemesh/standalone.jsp
@@ -5,7 +5,7 @@
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ page import="at.knowcenter.wag.egov.egiz.web.LocalRequestHelper" %>
-<html:html xhtml="true">
+<html>
<head>
<decorator:head/>
@@ -14,4 +14,4 @@
<body><decorator:body/></body>
-</html:html>
+</html>
diff --git a/src/site/changes.xml b/src/site/changes.xml
index 888c836..50f3c54 100644
--- a/src/site/changes.xml
+++ b/src/site/changes.xml
@@ -13,6 +13,22 @@
</release>
-->
+ <release version="3.0.8-20090113" date="2009-01-13" description="subsequent release">
+ <action dev="tknall" type="update">Switching to itext-2.1.5-rev3628.</action>
+ <action dev="gfliess" type="update">itext library: minor adjustments for pdf-as</action>
+ <action dev="tknall" type="add">Adding new error code (103) for invalid pdfa/1b font configuration.</action>
+ <action dev="gfliess" type="update">Minor updates for PDF/A support.</action>
+ <action dev="tknall" type="add">Support for local MOCCA CCS added.</action>
+ </release>
+
+ <release version="3.0.8-20081126" date="2008-11-26" description="subsequent release">
+ <action dev="tknall" type="add">Multi language for web application.</action>
+ <action dev="tknall" type="fix">Encoding issue for web application fixed by implementing an EncodingFilter.</action>
+ <action dev="tknall" type="update">Dynamic sign upload form implemented.</action>
+ <action dev="tknall" type="update">Order of input fields for dynamic upload form changed.</action>
+ <action dev="tknall" type="add">MOCCA logo added to sign upload form.</action>
+ </release>
+
<release version="3.0.8-20081119" date="2008-09-19" description="subsequent release">
<action dev="tknall" type="remove">lib-folder removed.</action>
<action dev="tknall" type="update">Maven2-repository updated.</action>
diff --git a/work/cfg/config.properties b/work/cfg/config.properties
index 765a548..9bcf39a 100644
--- a/work/cfg/config.properties
+++ b/work/cfg/config.properties
@@ -120,7 +120,7 @@ moc.available_for_web=true
moc.available_for_commandline=false
# MOCCA signature
-moc.sign.url=http://127.0.0.1:3495/bkuonline/http-security-layer-request
+moc.sign.url=http://127.0.0.1:8080/bkuonline/http-security-layer-request
moc.sign.KeyboxIdentifier=SecureSignatureKeypair
# default MOCCA signature template
moc.sign.request.detached=./templates/default.moc.sign.detached.xml
@@ -210,6 +210,7 @@ sig_obj.types.SIGNATURBLOCK_DE=on
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
#############################################
@@ -230,9 +231,11 @@ defaults.phlength.certificate=10000
# per profile: sig_obj.PROFILE.phlength.line_break_tolerance=xyz
defaults.phlength.line_break_tolerance=10
+# enable/disable PDF/A1b support for all profiles
+default.SIG_PDFA1B_VALID=false
#absolute positioning
-#sig_obj.PROFIL.pos=p:1;x:40.0;y:800.0;w:400.0
+#sig_obj.PROFIL.pos=p:1;x:40.0;y:800.0;w:400.0;f:80
# font definition: face,height,weight
# default_font: HELVETICA,8,NORMAL
@@ -256,6 +259,8 @@ sig_obj.AMTSSIGNATURBLOCK_DE.key.SIG_ID=Parameter
sig_obj.AMTSSIGNATURBLOCK_DE.key.SIG_META=Prüfinformation
sig_obj.AMTSSIGNATURBLOCK_DE.key.SIG_NOTE=Hinweis
+sig_obj.AMTSSIGNATURBLOCK_DE.pos=f:80
+
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.buergerkarte.at/signature-verification
sig_obj.AMTSSIGNATURBLOCK_DE.value.SIG_LABEL=./images/signatur-logo_de.png
@@ -301,6 +306,8 @@ sig_obj.AMTSSIGNATURBLOCK_EN.key.SIG_ID=Parameter
sig_obj.AMTSSIGNATURBLOCK_EN.key.SIG_META=Verification
sig_obj.AMTSSIGNATURBLOCK_EN.key.SIG_NOTE=Note
+sig_obj.AMTSSIGNATURBLOCK_EN.pos=f:80
+
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.buergerkarte.at/signature-verification
sig_obj.AMTSSIGNATURBLOCK_EN.value.SIG_LABEL=./images/signatur-logo_en.png
@@ -345,6 +352,8 @@ sig_obj.SIGNATURBLOCK_DE.key.SIG_KZ=Methode
sig_obj.SIGNATURBLOCK_DE.key.SIG_ID=Parameter
sig_obj.SIGNATURBLOCK_DE.key.SIG_META=Prüfinformation
+sig_obj.SIGNATURBLOCK_DE.pos=f:80
+
sig_obj.SIGNATURBLOCK_DE.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: https://www.buergerkarte.at/signature-verification
sig_obj.SIGNATURBLOCK_DE.value.SIG_LABEL=./images/signatur-logo_de.png
@@ -373,6 +382,52 @@ sig_obj.SIGNATURBLOCK_DE.table.info.6=SIG_ID-cv
###################################################################################################
+# PROFIL: Signaturblock (Deutsch) mit PDF/A-Support
+
+sig_obj.SIGNATURBLOCK_DE-PDFA.description=Standardsignatur Deutsch (PDF/A1b)
+
+# enable/disable PDF/A1b support for this profile
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_PDFA1B_VALID=true
+
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_VALUE=Signaturwert
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_NAME=Unterzeichner
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_DATE=Datum/Zeit-UTC
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_ISSUER=Aussteller-Zertifikat
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_NUMBER=Serien-Nr.
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_KZ=Methode
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_ID=Parameter
+sig_obj.SIGNATURBLOCK_DE-PDFA.key.SIG_META=Prüfinformation
+
+sig_obj.SIGNATURBLOCK_DE-PDFA.pos=f:80
+
+sig_obj.SIGNATURBLOCK_DE-PDFA.value.SIG_META=Informationen zur Prüfung der elektronischen Signatur und des Ausdrucks finden Sie unter: https://www.buergerkarte.at/signature-verification
+sig_obj.SIGNATURBLOCK_DE-PDFA.value.SIG_LABEL=./images/signatur-logo_de.png
+
+#---------------------- MAIN TABLE -------------------------
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.1=SIG_VALUE-cv
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.2=SIG_LABEL-i|TABLE-info
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.3=SIG_META-cv
+
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.ColsWidth=1 5
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.bgcolor=255 255 255
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.padding=3
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.border=0.1
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.halign=left
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.valign=middle
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.font=TTF:DejaVuSansCondensed.ttf,8
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.main.Style.valuefont=TTF:DejaVuSansMono.ttf,8
+
+#---------------------- INFO TABLE -------------------------
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.ColsWidth=1 4
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.1=SIG_NAME-cv
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.2=SIG_DATE-cv
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.3=SIG_ISSUER-cv
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.4=SIG_NUMBER-cv
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.5=SIG_KZ-cv
+sig_obj.SIGNATURBLOCK_DE-PDFA.table.info.6=SIG_ID-cv
+
+
+###################################################################################################
# PROFIL: minimaler Signaturblock (Deutsch)
sig_obj.SIGNATURBLOCK_MINIMAL_DE.description=minimale Standardsignatur Deutsch
@@ -381,7 +436,7 @@ 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.buergerkarte.at/signature-verification
sig_obj.SIGNATURBLOCK_MINIMAL_DE.value.SIG_LABEL=./images/signatur-logo_de.png
-sig_obj.SIGNATURBLOCK_MINIMAL_DE.pos=w:230.0
+sig_obj.SIGNATURBLOCK_MINIMAL_DE.pos=w:230.0;f:80
#---------------------- MAIN TABLE -------------------------
sig_obj.SIGNATURBLOCK_MINIMAL_DE.table.main.1=SIG_LABEL-i
@@ -409,7 +464,7 @@ 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.buergerkarte.at/signature-verification
sig_obj.SIGNATURBLOCK_MINIMAL_EN.value.SIG_LABEL=./images/signatur-logo_en.png
-sig_obj.SIGNATURBLOCK_MINIMAL_EN.pos=w:230.0
+sig_obj.SIGNATURBLOCK_MINIMAL_EN.pos=w:230.0;f:80
#---------------------- MAIN TABLE -------------------------
sig_obj.SIGNATURBLOCK_MINIMAL_EN.table.main.1=SIG_LABEL-i
@@ -442,6 +497,8 @@ sig_obj.SIGNATURBLOCK_EN.key.SIG_KZ=Method
sig_obj.SIGNATURBLOCK_EN.key.SIG_ID=Parameter
sig_obj.SIGNATURBLOCK_EN.key.SIG_META=Verification
+sig_obj.SIGNATURBLOCK_EN.pos=f:80
+
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.buergerkarte.at/signature-verification
sig_obj.SIGNATURBLOCK_EN.value.SIG_LABEL=./images/signatur-logo_en.png
@@ -562,6 +619,5 @@ ldap_mapping.acert_government2.issuer_name=EMAIL=a-cert@a-cert.at,CN=A-CERT GOVE
ldap_mapping.acert_government2.url=ldap://ldap.a-cert.at/ou=A-CERT GOVERNMENT 2,o=A-CERT,c=AT
ldap_mapping.acert_government2.serial_attr=serialNumber
-
# end LDAP-Mappings
#############################################
diff --git a/work/cfg/help_text.properties b/work/cfg/help_text.properties
index 3c61aab..ca06f3e 100644
--- a/work/cfg/help_text.properties
+++ b/work/cfg/help_text.properties
@@ -12,6 +12,7 @@ error.code.10=Das System kann nicht initialisiert werden. Bitte wenden Sie sich
error.code.100=Der Konfigurationsschlüssel konnte nicht gefunden werden.
error.code.101=Die Konfigurationsdatei konnte nicht geladen werden.
error.code.102=Das Signaturprofil enthält keinen Bericht für die Kennzeichnung.
+error.code.103=Für den PDA/A Modus muss eine einbettbare TrueType-Schrift konfiguriert sein.
#PDFDocumentException
error.code.201=Das PDF Dokument kann nicht gelesen werden, oder die Datei hat ein falsches Format.
@@ -65,7 +66,7 @@ error.code.370=Eine detached Signature kann zur Zeit mit MOA nicht überprüft wer
error.code.371=Dieses Signaturgerät unterstützt keine Signatur-Prüfung.
# Workaround for ITS(Mac/Linux) bug concerning the signing time.
-error.code.372=Der Signaturzeitpunkt ist ungültig. Stellen Sie bitte sicher, dass die Systemzeit sowie die Zeitzoneneinstellung Ihres Rechners korrekt sind.
+error.code.372=Der Signaturzeitpunkt ist ungültig. Stellen Sie bitte sicher, dass die Systemzeit sowie die Zeitzoneneinstellung Ihres Rechners korrekt sind sowie dass Sie die aktuellste Version Ihrer Bürgerkartenumgebung verwenden.
#NormalizeException
error.code.400=Das Normalisierungsmodul kann nicht initialisiert werden.
diff --git a/work/cfg/log4j.properties b/work/cfg/log4j.properties
index 2d3b0e0..e470745 100644
--- a/work/cfg/log4j.properties
+++ b/work/cfg/log4j.properties
@@ -1,17 +1,17 @@
log4j.rootLogger = WARN, CONSOLE, ROLLINGFILE
# DETAIL LEVELS
-log4j.logger.org.pdfbox = INFO
-log4j.logger.at.gv.egiz.pdfas = TRACE
-log4j.logger.at.knowcenter = TRACE
-log4j.logger.at.knowcenter.wag.egov.egiz.ldap = DEBUG
+#log4j.logger.at.gv.egiz.pdfas = TRACE
+#log4j.logger.at.knowcenter = TRACE
+log4j.logger.at.gv.egiz.pdfas = INFO
+log4j.logger.at.knowcenter = INFO
log4j.logger.org.apache.commons.httpclient.HttpMethodBase = ERROR
# CONSOLE
log4j.appender.CONSOLE = org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout = org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern = [%-5p@%d{dd.MM.yyyy HH:mm:ss}] %c:%M:%L - %m%n
-#log4j.appender.CONSOLE.threshold = ERROR
+log4j.appender.CONSOLE.threshold = ERROR
log4j.appender.CONSOLE.Target = System.out
# ROLLINGFILE