aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov/egiz/sig
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 13:47:48 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-12-14 13:47:48 +0000
commit9b615852df5f56eeb67c4dd021a56e72d31a2498 (patch)
tree5cdf42cdb8dd552d73f7d4ef4299aa4743975d5e /src/main/java/at/knowcenter/wag/egov/egiz/sig
parent8ba10b6fa16c78ec3a8661d7b050320971495405 (diff)
downloadpdf-as-3-9b615852df5f56eeb67c4dd021a56e72d31a2498.tar.gz
pdf-as-3-9b615852df5f56eeb67c4dd021a56e72d31a2498.tar.bz2
pdf-as-3-9b615852df5f56eeb67c4dd021a56e72d31a2498.zip
Error code created for protected pdf documents.
SettingsReader: Debug message for getInternalResource added (TRACE) multipart/formdata: align multipart charset with data charset added FIXME notes for FileHelper.readFromFile Signature/Verification-Demo updated git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@507 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov/egiz/sig')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java4
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/BKUPostConnection.java6
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapConnection.java6
4 files changed, 14 insertions, 4 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java
index c5ab9f5..c02b2c9 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/BKUConnector.java
@@ -626,6 +626,7 @@ public class BKUConnector implements LocalConnector
String keybox_identifier = getSignKeyboxIdentifier(signType);
String sign_request_filename = getSignRequestTemplateFileName(signType);
+ // FIXME[tknall]: might fail since template has been moved to library
String sign_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename));
if (logger_.isDebugEnabled())
{
@@ -650,6 +651,7 @@ public class BKUConnector implements LocalConnector
SignatureObject sigObject) throws SignatureException
{
String verify_request = getVerifyRequestTemplateFileName(sigObject.getSignationType());
+ // FIXME[tknall]: might fail since template has been moved to library
String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request));
if (logger_.isDebugEnabled())
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java
index 7406ccd..30bffb7 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/MOAConnector.java
@@ -181,6 +181,7 @@ public class MOAConnector implements Connector
String sign_request_filename = getSignRequestTemplateFileName(sigType);
String key_ident = getSignKeyIdentifier(sigType);
+ // FIXME[tknall]: might fail since template has been moved to library
String sign_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(sign_request_filename));
if (sign_req_str == null)
{
@@ -413,7 +414,9 @@ public class MOAConnector implements Connector
}
String verify_template = getVerifyTemplateFileName(sigObject.getSignationType());
String sig_prop_template = getSigPropFileName(sigObject.getSignationType());
+ // FIXME[tknall]: might fail since template has been moved to library
String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_template));
+ // FIXME[tknall]: might fail since template has been moved to library
String sig_prop_str = FileHelper.readFromFile(SettingsReader.relocateFile(sig_prop_template));
if (logger_.isDebugEnabled())
@@ -522,6 +525,7 @@ public class MOAConnector implements Connector
// +
// ".request");
String trust_profile = getVerifyTrustProfileID(sigObject.getSignationType());
+ // FIXME[tknall]: might fail since template has been moved to library
String verify_req_str = FileHelper.readFromFile(SettingsReader.relocateFile(verify_request));
String verify_template_str = null;
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 d2cffe8..6ea8ced 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
@@ -100,8 +100,10 @@ public final class BKUPostConnection
//ByteArrayPartSource baps = new ByteArrayPartSource(filename, data.getData());
FilePart filepart = new FilePart("fileupload", ps); //$NON-NLS-1$
filepart.setContentType(data.getMimeType());
- // this is optional
- // filepart.setCharSet(data.getCharacterEncoding());
+
+ // not really needed since external referenced data has to be taken "as-is" (binary stream) for
+ // digest calculation, so neither content type nor charset is relevant
+ filepart.setCharSet(data.getCharacterEncoding());
Part[] parts = { xmlpart, filepart };
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapConnection.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapConnection.java
index d0448cb..38998c4 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapConnection.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapConnection.java
@@ -198,8 +198,10 @@ public final class MOASoapConnection
FilePartMR filepart = new FilePartMR("fileupload", ps); //$NON-NLS-1$
filepart.setContentType(data.getMimeType());
filepart.setContentID("<fileupload>");
- // this is optional
- // filepart.setCharSet(data.getCharacterEncoding());
+
+ // not really needed since external referenced data has to be taken "as-is" (binary stream) for
+ // digest calculation, so neither content type nor charset is relevant
+ filepart.setCharSet(data.getCharacterEncoding());
Part[] parts = { xmlpart, filepart };