From 7b12b9c698c20b34faa72be882d5f3fb87114483 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Sep 2017 14:27:07 +0200 Subject: add PAdES flag and update IAIK libs --- moaSig/libs/iaik_eccelerate-4.02.jar | Bin 0 -> 498090 bytes moaSig/libs/iaik_eccelerate.jar | Bin 359608 -> 0 bytes moaSig/libs/iaik_eccelerate_addon-4.02.jar | Bin 0 -> 91739 bytes moaSig/libs/iaik_eccelerate_addon.jar | Bin 77097 -> 0 bytes moaSig/libs/iaik_eccelerate_cms-4.02.jar | Bin 0 -> 4819 bytes moaSig/libs/iaik_eccelerate_cms.jar | Bin 4501 -> 0 bytes moaSig/libs/iaik_jce_full-5.5_MOA.jar | Bin 0 -> 1283804 bytes moaSig/libs/iaik_jce_full.jar | Bin 1160539 -> 0 bytes moaSig/libs/iaik_moa-2.04.jar | Bin 523085 -> 0 bytes moaSig/libs/iaik_moa-2.05.jar | Bin 0 -> 523141 bytes moaSig/libs/iaik_pki_module-1.02.jar | Bin 598025 -> 0 bytes moaSig/libs/iaik_pki_module-1.04_moa.jar | Bin 0 -> 598049 bytes .../iaik/cmssign/CMSSignatureCreationProfileImpl.java | 11 ++++++++++- .../server/invoke/CMSSignatureCreationInvoker.java | 5 +++-- .../spss/server/service/SignatureCreationService.java | 7 ++++++- 15 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 moaSig/libs/iaik_eccelerate-4.02.jar delete mode 100644 moaSig/libs/iaik_eccelerate.jar create mode 100644 moaSig/libs/iaik_eccelerate_addon-4.02.jar delete mode 100644 moaSig/libs/iaik_eccelerate_addon.jar create mode 100644 moaSig/libs/iaik_eccelerate_cms-4.02.jar delete mode 100644 moaSig/libs/iaik_eccelerate_cms.jar create mode 100644 moaSig/libs/iaik_jce_full-5.5_MOA.jar delete mode 100644 moaSig/libs/iaik_jce_full.jar delete mode 100644 moaSig/libs/iaik_moa-2.04.jar create mode 100644 moaSig/libs/iaik_moa-2.05.jar delete mode 100644 moaSig/libs/iaik_pki_module-1.02.jar create mode 100644 moaSig/libs/iaik_pki_module-1.04_moa.jar (limited to 'moaSig') diff --git a/moaSig/libs/iaik_eccelerate-4.02.jar b/moaSig/libs/iaik_eccelerate-4.02.jar new file mode 100644 index 0000000..9727ab3 Binary files /dev/null and b/moaSig/libs/iaik_eccelerate-4.02.jar differ diff --git a/moaSig/libs/iaik_eccelerate.jar b/moaSig/libs/iaik_eccelerate.jar deleted file mode 100644 index 0ec3110..0000000 Binary files a/moaSig/libs/iaik_eccelerate.jar and /dev/null differ diff --git a/moaSig/libs/iaik_eccelerate_addon-4.02.jar b/moaSig/libs/iaik_eccelerate_addon-4.02.jar new file mode 100644 index 0000000..75446fc Binary files /dev/null and b/moaSig/libs/iaik_eccelerate_addon-4.02.jar differ diff --git a/moaSig/libs/iaik_eccelerate_addon.jar b/moaSig/libs/iaik_eccelerate_addon.jar deleted file mode 100644 index bd57ff2..0000000 Binary files a/moaSig/libs/iaik_eccelerate_addon.jar and /dev/null differ diff --git a/moaSig/libs/iaik_eccelerate_cms-4.02.jar b/moaSig/libs/iaik_eccelerate_cms-4.02.jar new file mode 100644 index 0000000..b788f05 Binary files /dev/null and b/moaSig/libs/iaik_eccelerate_cms-4.02.jar differ diff --git a/moaSig/libs/iaik_eccelerate_cms.jar b/moaSig/libs/iaik_eccelerate_cms.jar deleted file mode 100644 index 3c9ac83..0000000 Binary files a/moaSig/libs/iaik_eccelerate_cms.jar and /dev/null differ diff --git a/moaSig/libs/iaik_jce_full-5.5_MOA.jar b/moaSig/libs/iaik_jce_full-5.5_MOA.jar new file mode 100644 index 0000000..4f0e903 Binary files /dev/null and b/moaSig/libs/iaik_jce_full-5.5_MOA.jar differ diff --git a/moaSig/libs/iaik_jce_full.jar b/moaSig/libs/iaik_jce_full.jar deleted file mode 100644 index 736981a..0000000 Binary files a/moaSig/libs/iaik_jce_full.jar and /dev/null differ diff --git a/moaSig/libs/iaik_moa-2.04.jar b/moaSig/libs/iaik_moa-2.04.jar deleted file mode 100644 index 98ee49d..0000000 Binary files a/moaSig/libs/iaik_moa-2.04.jar and /dev/null differ diff --git a/moaSig/libs/iaik_moa-2.05.jar b/moaSig/libs/iaik_moa-2.05.jar new file mode 100644 index 0000000..51dc3f0 Binary files /dev/null and b/moaSig/libs/iaik_moa-2.05.jar differ diff --git a/moaSig/libs/iaik_pki_module-1.02.jar b/moaSig/libs/iaik_pki_module-1.02.jar deleted file mode 100644 index cc32a74..0000000 Binary files a/moaSig/libs/iaik_pki_module-1.02.jar and /dev/null differ diff --git a/moaSig/libs/iaik_pki_module-1.04_moa.jar b/moaSig/libs/iaik_pki_module-1.04_moa.jar new file mode 100644 index 0000000..e9bec14 Binary files /dev/null and b/moaSig/libs/iaik_pki_module-1.04_moa.jar differ diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmssign/CMSSignatureCreationProfileImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmssign/CMSSignatureCreationProfileImpl.java index 2dc047a..a465049 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmssign/CMSSignatureCreationProfileImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmssign/CMSSignatureCreationProfileImpl.java @@ -61,6 +61,7 @@ public class CMSSignatureCreationProfileImpl private boolean includeData; /** Digest Method algorithm */ private String digestMethod; + private boolean isPAdESConform; /** @@ -77,13 +78,15 @@ public class CMSSignatureCreationProfileImpl List signedProperties, boolean securityLayerConform, boolean includeData, - String mimeType) { + String mimeType, + boolean isPAdESConform) { this.keySet = keySet; this.signedProperties = signedProperties; this.securityLayerConform = securityLayerConform; this.includeData = includeData; this.mimeType = mimeType; this.digestMethod = digestMethod; + this.isPAdESConform = isPAdESConform; } @@ -246,4 +249,10 @@ public class CMSSignatureCreationProfileImpl return this.includeData; } + +@Override +public boolean isPAdESConform() { + return this.isPAdESConform; +} + } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureCreationInvoker.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureCreationInvoker.java index 753d769..4050ebc 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureCreationInvoker.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureCreationInvoker.java @@ -181,7 +181,7 @@ public class CMSSignatureCreationInvoker { CMSDataObject dataobject = dataObjectInfo.getDataObject(); MetaInfo metainfo = dataobject.getMetaInfo(); - /*TODO: does not set SigningTime in IAIK-MOA request or any other + /*TODO: do not set SigningTime in IAIK-MOA request or any other * API method/parameter when IAIK-MOA API is updated. * Maybe also update mimetype solution below */ @@ -245,7 +245,8 @@ public class CMSSignatureCreationInvoker { signedProperties, isSecurityLayerConform, includeData, - mimetype); + mimetype, + isPAdESConformRequired); // create CMSSignature from the CMSSignatureCreationModule // build the additionalSignedProperties diff --git a/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java b/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java index 4effec6..839d8ba 100644 --- a/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java +++ b/moaSig/moa-sig/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java @@ -116,6 +116,7 @@ public class SignatureCreationService { Logger.trace(">>> creating Signature"); // invoke the core logic //responseObj = PDFASInvoker.getInstance().createPDFSignature(requestObj, context.getTransactionID()); + Logger.trace("<<< created Signature"); Logger.trace(">>> building Response"); @@ -127,7 +128,11 @@ public class SignatureCreationService { context.setResponse(response[0]); Logger.trace("---- Leaving SignatureCreationService"); + //TODO: remove if PDF signatures are supported + throw new MOASystemException("Create PAdES signatures is currently NOT supported by MOA-SIG", null); + //return response; + } catch (MOAException e) { AxisFault fault = AxisFault.makeFault(e); fault.setFaultDetail(new Element[] { e.toErrorResponse()}); @@ -143,7 +148,7 @@ public class SignatureCreationService { throw fault; } - return response; + } /** -- cgit v1.2.3