aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-03 11:46:16 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2010-12-03 11:46:16 +0000
commit3e32cdf2bb1918cd02be37873e2e6282b697e32e (patch)
tree8430e91725c31de3860dd624228706c0d250e9d6 /src/main/java
parent051d00a65753c49d110f05466664faf0e1126bf4 (diff)
downloadpdf-as-3-3e32cdf2bb1918cd02be37873e2e6282b697e32e.tar.gz
pdf-as-3-3e32cdf2bb1918cd02be37873e2e6282b697e32e.tar.bz2
pdf-as-3-3e32cdf2bb1918cd02be37873e2e6282b697e32e.zip
Minor updates (log messages...)
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@667 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/api/commons/DynamicSignatureProfileImpl.java5
-rw-r--r--src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java4
-rw-r--r--src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java2
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java1
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/ConnectorChooser.java7
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/bku/DetachedBKUConnector.java3
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/moa/MOASoapWithAttachmentConnector.java3
8 files changed, 13 insertions, 14 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/commons/DynamicSignatureProfileImpl.java b/src/main/java/at/gv/egiz/pdfas/api/commons/DynamicSignatureProfileImpl.java
index 81e9005..3025e8a 100644
--- a/src/main/java/at/gv/egiz/pdfas/api/commons/DynamicSignatureProfileImpl.java
+++ b/src/main/java/at/gv/egiz/pdfas/api/commons/DynamicSignatureProfileImpl.java
@@ -168,7 +168,7 @@ public class DynamicSignatureProfileImpl implements DynamicSignatureProfile {
SignatureTypes.getInstance().addSignatureType(this.name);
store();
} catch (Exception e) {
- throw new RuntimeException("schas", e);
+ throw new RuntimeException(e);
}
}
@@ -184,9 +184,8 @@ public class DynamicSignatureProfileImpl implements DynamicSignatureProfile {
SignatureTypes.getInstance().removeSignatureType(this.name);
remove();
- System.err.println("DISPOSED ddd");
} catch (Exception e) {
- throw new RuntimeException("schas", e);
+ throw new RuntimeException(e);
}
}
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 50678db..a23c9e3 100644
--- a/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
+++ b/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
@@ -9,6 +9,7 @@ import at.gv.egiz.pdfas.framework.ConnectorFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import at.knowcenter.wag.egov.egiz.PdfAS;
import at.knowcenter.wag.egov.egiz.PdfASID;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.framework.SignatorFactory;
@@ -118,8 +119,7 @@ public class CommandlineConnectorChooser
return chooseDetachedMultipartConnector(connectorType);
}
-
- throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE_METHOD, "The SIG_KZ version '" + sig_kz.getVersion() + "' is unknown.");
+ throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE, "The SIG_KZ version '" + sig_kz.getVersion() + "' is unknown. Please get a new version of PDF-AS. Your version is: " + PdfAS.PDFAS_VERSION);
}
protected static String chooseEnvelopingBase64ConnectorOld(String sig_app) throws ConnectorException
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 89c4e07..aa90330 100644
--- a/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
+++ b/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
@@ -53,7 +53,7 @@ public final class ErrorCode
public static final int NON_BINARY_SIGNATURES_PRESENT = 317;
public static final int UNSUPPORTED_REPLACES_NAME = 318;
- public static final int UNSUPPORTED_SIGNATURE_METHOD = 319;
+ public static final int UNSUPPORTED_SIGNATURE = 319;
public static final int SIGNATURE_VERIFICATION_NOT_SUPPORTED = 371;
public static final int INVALID_SIGNING_TIME = 372;
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
index 8816b1c..c0639a3 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
@@ -340,7 +340,6 @@ public class PdfAsObject implements PdfAs
AnalyzeParameters ap = new AnalyzeParameters();
fillAnalyzeParametersWithVerifyParameters(ap, verifyParameters);
AnalyzeResult analyzeResult = analyze(ap);
- System.err.println(ToStringBuilder.reflectionToString(analyzeResult));
if (verifyParameters.getSignatureToVerify() != Constants.VERIFY_ALL)
{
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 e1a3b8d..9315477 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/PdfAS.java
@@ -108,7 +108,7 @@ public abstract class PdfAS
* The current version of the pdf-as library. This version string is logged on every invocation
* of the api or the web application.
*/
- public static final String PDFAS_VERSION = "3.1.1-snapshot (20101007)";
+ public static final String PDFAS_VERSION = "3.2-SNAPSHOT (20101203)";
/**
* The key of the strict mode setting.
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/ConnectorChooser.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/ConnectorChooser.java
index 98d336e..336d7b2 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/ConnectorChooser.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/ConnectorChooser.java
@@ -9,6 +9,7 @@ import org.apache.commons.logging.LogFactory;
import at.gv.egiz.pdfas.api.commons.Constants;
import at.gv.egiz.pdfas.exceptions.ErrorCode;
import at.gv.egiz.pdfas.framework.ConnectorParameters;
+import at.knowcenter.wag.egov.egiz.PdfAS;
import at.knowcenter.wag.egov.egiz.PdfASID;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.framework.SignatorFactory;
@@ -164,8 +165,7 @@ public final class ConnectorChooser
cp.setProfileId(profile);
return new LocRefDetachedBKUConnector(cp, loc_ref_url);
}
-
- throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE_METHOD, "The SIG_KZ version '" + sig_kz.getVersion() + "' is unknown.");
+ throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE, "The SIG_KZ version '" + sig_kz.getVersion() + "' is unknown. Please get a new version of PDF-AS. Your version is: " + PdfAS.PDFAS_VERSION);
}
public static Connector chooseWebConnectorForVerify(String connector,
@@ -204,8 +204,7 @@ public final class ConnectorChooser
cp.setProfileId(profile);
return new MOASoapWithAttachmentConnector(cp);
}
-
- throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE_METHOD, "The SIG_KZ version '" + sig_kz.getVersion() + "' is unknown.");
+ throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE, "The SIG_KZ version '" + sig_kz.getVersion() + "' is unknown. Please get a new version of PDF-AS. Your version is: " + PdfAS.PDFAS_VERSION);
}
// public static Connector chooseCommandlineConnectorForVerify(String connector,
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 dcb758d..80a80bc 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
@@ -14,6 +14,7 @@ import at.gv.egiz.pdfas.algorithmSuite.AlgorithmSuiteUtil;
import at.gv.egiz.pdfas.api.xmldsig.XMLDsigData;
import at.gv.egiz.pdfas.exceptions.ErrorCode;
import at.gv.egiz.pdfas.framework.ConnectorParameters;
+import at.knowcenter.wag.egov.egiz.PdfAS;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
@@ -373,7 +374,7 @@ public class DetachedBKUConnector implements Connector, LocalConnector
}
// unknown
else {
- throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE_METHOD, "unsupported signature, get a new pdf-as version. " + so.id + ", " +so.kz);
+ throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE, "Unsupported signature (" + so.id + ", " +so.kz + "). Please get a new version of PDF-AS. Your version is: " + PdfAS.PDFAS_VERSION);
}
}
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 a111ca5..296a7ed 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
@@ -14,6 +14,7 @@ import at.gv.egiz.pdfas.algorithmSuite.AlgorithmSuiteUtil;
import at.gv.egiz.pdfas.api.xmldsig.XMLDsigData;
import at.gv.egiz.pdfas.exceptions.ErrorCode;
import at.gv.egiz.pdfas.framework.ConnectorParameters;
+import at.knowcenter.wag.egov.egiz.PdfAS;
import at.knowcenter.wag.egov.egiz.cfg.SettingsReader;
import at.knowcenter.wag.egov.egiz.exceptions.ConnectorException;
import at.knowcenter.wag.egov.egiz.exceptions.SettingsException;
@@ -241,7 +242,7 @@ public class MOASoapWithAttachmentConnector implements Connector
DetachedBKUConnector bku_connector = new DetachedBKUConnector(this.params, "not needed here");
return bku_connector.prepareXMLContent(data, so);
} else {
- throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE_METHOD, "unsupported signature, get a new pdf-as version. " + so.id + ", " +so.kz);
+ throw new ConnectorException(ErrorCode.UNSUPPORTED_SIGNATURE, "Unsupported signature (" + so.id + ", " +so.kz + "). Please get a new version of PDF-AS. Your version is: " + PdfAS.PDFAS_VERSION);
}
}