From c4efec1daeb50b30d363bb9fb83aec5435dbf2ad Mon Sep 17 00:00:00 2001 From: tknall Date: Mon, 27 Apr 2009 08:16:42 +0000 Subject: New signature layout for new MOCCA bku integrated (etsi-moc-1.1). New architecture implemented that allows different signature layouts for single types of BKUs. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@337 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../at/gv/egiz/pdfas/api/commons/Constants.java | 2 + .../at/gv/egiz/pdfas/exceptions/ErrorCode.java | 5 +- .../egiz/pdfas/framework/ConnectorParameters.java | 147 ++++++++++----------- 3 files changed, 75 insertions(+), 79 deletions(-) (limited to 'src/main/java/at/gv') diff --git a/src/main/java/at/gv/egiz/pdfas/api/commons/Constants.java b/src/main/java/at/gv/egiz/pdfas/api/commons/Constants.java index 19f7613..4fec0a1 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/commons/Constants.java +++ b/src/main/java/at/gv/egiz/pdfas/api/commons/Constants.java @@ -110,6 +110,8 @@ public final class Constants * The name of the directory, where temporary files are stored. */ public static final String TEMP_DIR_NAME = "pdfastmp"; + + public static final String BKU_HEADER_SIGNATURE_LAYOUT = "SignatureLayout"; } 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 f6b5602..c51d10a 100644 --- a/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java +++ b/src/main/java/at/gv/egiz/pdfas/exceptions/ErrorCode.java @@ -20,6 +20,7 @@ public final class ErrorCode 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 INVALID_SIGNATURE_LAYOUT_IMPL_CONFIGURED = 104; public static final int DOCUMENT_CANNOT_BE_READ = 201; public static final int TEXT_EXTRACTION_EXCEPTION = 202; @@ -44,7 +45,9 @@ public final class ErrorCode public static final int NON_BINARY_SIGNATURES_PRESENT = 317; public static final int SIGNATURE_VERIFICATION_NOT_SUPPORTED = 371; - public static final int INVALID_SIGNING_TIME = 372; + public static final int INVALID_SIGNING_TIME = 372; + + public static final int BKU_NOT_SUPPORTED = 373; public static final int WEB_EXCEPTION = 330; diff --git a/src/main/java/at/gv/egiz/pdfas/framework/ConnectorParameters.java b/src/main/java/at/gv/egiz/pdfas/framework/ConnectorParameters.java index a7c5d7a..235a03e 100644 --- a/src/main/java/at/gv/egiz/pdfas/framework/ConnectorParameters.java +++ b/src/main/java/at/gv/egiz/pdfas/framework/ConnectorParameters.java @@ -15,93 +15,84 @@ import java.util.Date; * * @author wprinz */ -public class ConnectorParameters -{ - /** - * The profile Id to get the connector parameters from. - * - *

- * The there are no explicit parameters for the connector in the profile, the - * default parameters are used. - *

- */ - protected String profileId = null; +public class ConnectorParameters { + /** + * The profile Id to get the connector parameters from. + * + *

+ * The there are no explicit parameters for the connector in the profile, the + * default parameters are used. + *

+ */ + protected String profileId = null; - /** - * The signature key identifier to be used or null if it should be read from - * the profile. - * - *

- * Currently this is only used by MOA connectors and identifies the MOA key - * group to be used when signing. If null, the MOA connector reads the key - * from the profile. - *

- */ - protected String signatureKeyIdentifier = null; + /** + * The signature key identifier to be used or null if it should be read from + * the profile. + * + *

+ * Currently this is only used by MOA connectors and identifies the MOA key + * group to be used when signing. If null, the MOA connector reads the key + * from the profile. + *

+ */ + protected String signatureKeyIdentifier = null; - /** - * Tells, if the connector should ask the device to return the hash input - * data. - * - *

- * Note that not all connectors support to return the hash input data - so - * there is no guarantee that the hash value will actually be returned. - *

- */ - protected boolean returnHashInputData = false; + /** + * Tells, if the connector should ask the device to return the hash input + * data. + * + *

+ * Note that not all connectors support to return the hash input data - so + * there is no guarantee that the hash value will actually be returned. + *

+ */ + protected boolean returnHashInputData = false; - /** - * Allows to specify an explicit time of verification. - * - *

- * If null, the device's default behaviour determines the time of - * verification, which is usually the current time. - *

- *

- * The time of verification usually influences the certificate check. E.g. the - * certificate may not be valid at the time of verification. - *

- */ - protected Date verificationTime = null; + /** + * Allows to specify an explicit time of verification. + * + *

+ * If null, the device's default behaviour determines the time of + * verification, which is usually the current time. + *

+ *

+ * The time of verification usually influences the certificate check. E.g. + * the certificate may not be valid at the time of verification. + *

+ */ + protected Date verificationTime = null; - public String getProfileId() - { - return this.profileId; - } + public String getProfileId() { + return this.profileId; + } - public void setProfileId(String profileId) - { - this.profileId = profileId; - } - - public String getSignatureKeyIdentifier() - { - return this.signatureKeyIdentifier; - } + public void setProfileId(String profileId) { + this.profileId = profileId; + } - public void setSignatureKeyIdentifier(String signatureKeyIdentifier) - { - this.signatureKeyIdentifier = signatureKeyIdentifier; - } + public String getSignatureKeyIdentifier() { + return this.signatureKeyIdentifier; + } - public boolean isReturnHashInputData() - { - return this.returnHashInputData; - } + public void setSignatureKeyIdentifier(String signatureKeyIdentifier) { + this.signatureKeyIdentifier = signatureKeyIdentifier; + } - public void setReturnHashInputData(boolean returnHashInputData) - { - this.returnHashInputData = returnHashInputData; - } + public boolean isReturnHashInputData() { + return this.returnHashInputData; + } - public Date getVerificationTime() - { - return this.verificationTime; - } + public void setReturnHashInputData(boolean returnHashInputData) { + this.returnHashInputData = returnHashInputData; + } - public void setVerificationTime(Date verificationTime) - { - this.verificationTime = verificationTime; - } + public Date getVerificationTime() { + return this.verificationTime; + } + + public void setVerificationTime(Date verificationTime) { + this.verificationTime = verificationTime; + } } -- cgit v1.2.3