aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/api/verify/VerifyResult.java2
-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.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java2
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/ConnectorChooser.java4
5 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyResult.java b/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyResult.java
index 73b3968..f8ba4ae 100644
--- a/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyResult.java
+++ b/src/main/java/at/gv/egiz/pdfas/api/verify/VerifyResult.java
@@ -23,7 +23,7 @@ public interface VerifyResult extends SignatureInformation
public boolean isVerificationDone();
/**
- * Returns a verification exception if any. Shows that the verification could not be startet. See {@link #isVerificationDone()}.
+ * Returns a verification exception if any. Shows that the verification could not be started. See {@link #isVerificationDone()}.
* @return
*/
public PdfAsException getVerificationException();
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 a23c9e3..3556c45 100644
--- a/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
+++ b/src/main/java/at/gv/egiz/pdfas/commandline/CommandlineConnectorChooser.java
@@ -171,7 +171,7 @@ public class CommandlineConnectorChooser
// String msg = "A Detached signature cannot be verified with the MOA connector (yet)."; //$NON-NLS-1$
// log.error(msg);
-// throw new ConnectorException(370, msg);
+// throw new ConnectorException(ErrorCode.DETACHED_SIGNATURE_NOT_SUPPORTED, msg);
return ConnectorFactory.DETACHED_LOCREF_MOA_CONNECTOR;
}
throw new ConnectorException(310, "Unknown sig_app '" + sig_app + "'."); //$NON-NLS-1$ //$NON-NLS-2$
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 aa90330..64d1470 100644
--- a/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
+++ b/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java
@@ -55,6 +55,8 @@ public final class ErrorCode
public static final int UNSUPPORTED_REPLACES_NAME = 318;
public static final int UNSUPPORTED_SIGNATURE = 319;
+ public static final int DETACHED_SIGNATURE_NOT_SUPPORTED = 370;
+
public static final int SIGNATURE_VERIFICATION_NOT_SUPPORTED = 371;
public static final int INVALID_SIGNING_TIME = 372;
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java b/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java
index 415aa04..b218062 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/framework/VerificationFilter.java
@@ -252,7 +252,7 @@ public class VerificationFilter
{
if (signature_block_detected && !current_block_contains_signature)
{
- throw new PDFDocumentException(316, "Das Dokument wurde nach erfolgter Signierung verändert.");
+ throw new PDFDocumentException(ErrorCode.MODIFIED_AFTER_SIGNATION, "Das Dokument wurde nach erfolgter Signierung verändert.");
}
}
}
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 336d7b2..5db7696 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
@@ -195,7 +195,7 @@ public final class ConnectorChooser
{
log.debug("sig_kz version is 1.1.0/1.2.0 -> choosing detached (loc ref) connector.");
- //throw new ConnectorException(370, "The MOA detached connector is not suitable for verification.");
+ //throw new ConnectorException(ErrorCode.DETACHED_SIGNATURE_NOT_SUPPORTED, "The MOA detached connector is not suitable for verification.");
// TODO TR: Switch her for SwA or Detached-URL Connector
// the following line is used in connection with LocRef-Connector
// return new DetachedLocRefMOAConnector(profile, loc_ref_url);
@@ -325,7 +325,7 @@ public final class ConnectorChooser
String msg = "A Detached signature cannot be verified with the MOA connector (yet)."; //$NON-NLS-1$
log.error(msg);
- throw new ConnectorException(370, msg);
+ throw new ConnectorException(ErrorCode.DETACHED_SIGNATURE_NOT_SUPPORTED, msg);
}
throw new ConnectorException(310, "Unknown sig_app '" + sig_app + "'."); //$NON-NLS-1$ //$NON-NLS-2$
}