From cf8769c549882f47bad496bc4ba9bd14a65429bc Mon Sep 17 00:00:00 2001 From: tlenz Date: Fri, 5 May 2017 07:42:27 +0200 Subject: update iaik_moa.jar to 2.03 update MOA-SP to support new IAIK_MOA API --- moaSig/handbook/handbook/usage/usage.html | 20 ++++++++++++--- moaSig/libs/iaik_moa-2.03.jar | Bin 531907 -> 525241 bytes .../gv/egovernment/moa/spss/OutputConstants.java | 2 +- .../invoke/CMSSignatureVerificationInvoker.java | 4 --- .../invoke/XMLSignatureVerificationInvoker.java | 2 -- .../egovernment/moa/spss/util/AdESResultUtils.java | 28 +++++++++++++++++---- 6 files changed, 41 insertions(+), 15 deletions(-) (limited to 'moaSig') diff --git a/moaSig/handbook/handbook/usage/usage.html b/moaSig/handbook/handbook/usage/usage.html index f75f897..ea95f60 100644 --- a/moaSig/handbook/handbook/usage/usage.html +++ b/moaSig/handbook/handbook/usage/usage.html @@ -972,17 +972,27 @@ positive Ganzzahl repräsentiert, die auf das beinhaltende dsig:Manife 0 VALID - Zertifikatsprüfung erfolgreich + Extended Validierung erfolgreich 1 INVALID - Zertifikatsprüfung nicht erfolgreich + Extended Validierung nicht erfolgreich. 2 INDETERMINATE - Zertifikatsstatus nicht ermittelbar + Ergebnis der extended Validierung ist aktuell nicht eindeutig ermittelbar, da zum Prüfzeitpunkt nicht alle Quellen erreichbar oder validierbar waren. + + + 3 + SKIPPED + Extended Validierung nicht durchgeführt + + + 4 + ERROR + Allgemeiner Fehler während der extended Validierung

 

@@ -1092,6 +1102,10 @@ positive Ganzzahl repräsentiert, die auf das beinhaltende dsig:Manife 24 Fehler + + 25 + Die PAdES Signatur verwendet einen unbekannter SubFilter und kann somit nicht validiert werden. +

 

2.1.4.3 Prüfung eines XMLDSIG-Manifests

diff --git a/moaSig/libs/iaik_moa-2.03.jar b/moaSig/libs/iaik_moa-2.03.jar index d43c724..2771bfa 100644 Binary files a/moaSig/libs/iaik_moa-2.03.jar and b/moaSig/libs/iaik_moa-2.03.jar differ diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/OutputConstants.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/OutputConstants.java index 83519d2..c264475 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/OutputConstants.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/OutputConstants.java @@ -2,7 +2,7 @@ package at.gv.egovernment.moa.spss; import java.lang.reflect.Field; -import iaik.server.modules.ResultCode; +import iaik.server.modules.resultcodes.ResultCode; public class OutputConstants { public static void main(String[] argv) throws IllegalArgumentException, IllegalAccessException { diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java index d618bab..34d6a22 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java @@ -288,8 +288,6 @@ public class CMSSignatureVerificationInvoker { Logger.info("Extended Validation Info: " + result.getInfo()); extCheckResult = AdESResultUtils.getExtendedResult(result.getResultCode()); - } catch (ConfigurationException e) { - Logger.warn("Cannot generate Extendend Result. Check SVA Configuration!", e); } catch (NullPointerException e) { Logger.info("No extendend validation result available."); } @@ -357,8 +355,6 @@ public class CMSSignatureVerificationInvoker { Logger.info("Extended Validation Info: " + result.getInfo()); extCheckResult = AdESResultUtils.getExtendedResult(result.getResultCode()); - } catch (ConfigurationException e) { - Logger.warn("Cannot generate Extendend Result. Check SVA Configuration!", e); } catch (NullPointerException e) { Logger.info("No extendend validation result available."); } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java index 827728c..e68092f 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java @@ -260,8 +260,6 @@ public class XMLSignatureVerificationInvoker { extCheckResult = AdESResultUtils.getExtendedResult(result.getResultCode()); responseBuilder.setExtendedCertificateCheckResult(extCheckResult); - } catch (ConfigurationException e) { - Logger.warn("Cannot generate Extendend Result. Check SVA Configuration!", e); } catch (NullPointerException e) { Logger.info("No extendend validation result available."); } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java index b6bba93..b1fee06 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java @@ -12,19 +12,24 @@ import at.gv.egovernment.moaspss.logging.Logger; import iaik.esi.sva.validation.ValidationReport; import iaik.server.ConfigurationException; import iaik.server.modules.AdESVerificationResult; -import iaik.server.modules.ResultCode; -import iaik.server.modules.ResultCodeInvalid; -import iaik.server.modules.ResultCodeValid; import iaik.server.modules.SignatureVerificationProfile; import iaik.server.modules.SignatureVerificationResult; +import iaik.server.modules.resultcodes.ResultCode; +import iaik.server.modules.resultcodes.ResultCodeError; +import iaik.server.modules.resultcodes.ResultCodeInvalid; +import iaik.server.modules.resultcodes.ResultCodeSkipped; +import iaik.server.modules.resultcodes.ResultCodeValid; public class AdESResultUtils { + private static final int MAJORRESULTCODESKIPPED = new Integer(3); + private static final int MAJORRESULTCODEERROR = new Integer(4); + public static Integer getResultCode(Integer adesCode) { return adesCode; } - public static ExtendedCertificateCheckResult getExtendedResult(iaik.server.modules.ResultCode resultCode) { + public static ExtendedCertificateCheckResult getExtendedResult(iaik.server.modules.resultcodes.ResultCode resultCode) { ExtendedCertificateCheckResult check = null; int majorCode = -1; @@ -37,9 +42,19 @@ public class AdESResultUtils { if (resultCode instanceof ResultCodeValid) { majorCode = SignatureVerificationResult.VALID; majorInfo = "VALID"; + } else if (resultCode instanceof ResultCodeInvalid) { majorCode = SignatureVerificationResult.INVALID; majorInfo = "INVALID"; + + } else if (resultCode instanceof ResultCodeSkipped) { + majorCode = MAJORRESULTCODESKIPPED; + majorInfo = "SKIPPED"; + + } else if (resultCode instanceof ResultCodeError) { + majorCode = MAJORRESULTCODEERROR; + majorInfo = "ERROR"; + } else { majorCode = SignatureVerificationResult.INDETERMINATE; majorInfo = "INDETERMINATE"; @@ -93,7 +108,10 @@ public class AdESResultUtils { minorInfo = "UNKNOWN_COMMITMENT_TYPE"; } else if (resultCode.getCode().equals(ResultCode.SUCCESS)) { minorInfo = "SUCCESS"; + } else if (resultCode.getCode().equals(ResultCode.UNKNOWN_SUBFILTER)) { + minorInfo = "UNKNOWN_SUBFILTER"; } + } check = new ExtendedCertificateCheckResultImpl(majorCode, majorInfo, minorCode, @@ -198,7 +216,7 @@ public class AdESResultUtils { try { AdESFormResultsImpl adESFormResultsImpl = new AdESFormResultsImpl(); - ResultCode resultCode = subResult.getResultCode(); + iaik.server.modules.resultcodes.ResultCode resultCode = subResult.getResultCode(); if (resultCode instanceof ResultCodeValid) { adESFormResultsImpl.setCode(SignatureVerificationResult.VALID);// .getResultCode().getCode())); } else if (resultCode instanceof ResultCodeInvalid) { -- cgit v1.2.3