diff options
author | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-11-27 20:57:33 +0100 |
---|---|---|
committer | Tobias Kellner <tobias.kellner@iaik.tugraz.at> | 2014-11-27 20:57:33 +0100 |
commit | 9e50f1a103a37d9dcfbeb5ea45bcf6c6c0c0f6dd (patch) | |
tree | 03355244de7f50fc75f0ccffb51cd0073ba92340 /pdf-over-signator/src | |
parent | 896fbe4a5643bf8c29968f8514a1c14fd51c4d9e (diff) | |
download | pdf-over-9e50f1a103a37d9dcfbeb5ea45bcf6c6c0c0f6dd.tar.gz pdf-over-9e50f1a103a37d9dcfbeb5ea45bcf6c6c0c0f6dd.tar.bz2 pdf-over-9e50f1a103a37d9dcfbeb5ea45bcf6c6c0c0f6dd.zip |
Implement PDF-AS 4 changes
Diffstat (limited to 'pdf-over-signator/src')
4 files changed, 57 insertions, 5 deletions
diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/BkuSlConnector.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/BkuSlConnector.java new file mode 100644 index 00000000..bd908b1d --- /dev/null +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/BkuSlConnector.java @@ -0,0 +1,30 @@ +/*
+ * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://joinup.ec.europa.eu/software/page/eupl
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ */
+package at.asit.pdfover.signator;
+
+// Imports
+
+/**
+ *
+ */
+public interface BkuSlConnector {
+ /**
+ * @param request
+ * @return SL Response
+ * @throws SignatureException
+ */
+ public SLResponse handleSLRequest(SLRequest request) throws SignatureException;
+}
diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java index 15f31771..9edd0a02 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SLRequest.java @@ -114,4 +114,13 @@ public class SLRequest { { return this.signatureData; } + + /** + * Gets the request String + * + * @return the request + */ + public String getRequest() { + return this.request; + } } diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java index c55a7555..31cf18be 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/Signator.java @@ -36,9 +36,13 @@ public class Signator { */ public enum Signers { /** - * PDF-AS + * PDF-AS 3 */ - PDFAS + PDFAS, + /** + * PDF-AS 4 + */ + PDFAS4 }; private static Map<Signers, SignerFactory> factoryMap; @@ -47,9 +51,12 @@ public class Signator { factoryMap = new EnumMap<Signers, SignerFactory>(Signers.class); try { - Class<?> pdfAsClass = Class.forName("at.asit.pdfover.signer.pdfas.PDFASSignerFactory"); - SignerFactory factory = (SignerFactory)pdfAsClass.newInstance(); - registerSigner(Signers.PDFAS, factory); +// Class<?> pdfAsClass = Class.forName("at.asit.pdfover.signer.pdfas.PDFASSignerFactory"); +// SignerFactory factory = (SignerFactory)pdfAsClass.newInstance(); +// registerSigner(Signers.PDFAS, factory); + Class<?> pdfAs4Class = Class.forName("at.asit.pdfover.signer.pdfas.PdfAs4SignerFactory"); + SignerFactory factory = (SignerFactory)pdfAs4Class.newInstance(); + registerSigner(Signers.PDFAS4, factory); } catch (ClassNotFoundException e) { log.error("PDF Signer Factory not found", e); throw new RuntimeException("PDF Signer Factory not found", e); diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java index 93facb86..b86e356c 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SigningState.java @@ -37,4 +37,10 @@ public interface SigningState { * @return true if a SLResponse is set */ public boolean hasSignatureResponse(); + + /** + * Set the BKU connector + * @param connector the BKU connector + */ + public void setBKUConnector(BkuSlConnector connector); } |