diff options
author | tlenz <thomas.lenz@egiz.gv.at> | 2017-05-05 07:42:27 +0200 |
---|---|---|
committer | tlenz <thomas.lenz@egiz.gv.at> | 2017-05-05 07:42:27 +0200 |
commit | cf8769c549882f47bad496bc4ba9bd14a65429bc (patch) | |
tree | c4493e9f1ea9cc3c50c41e1cf557519f9e05cb20 | |
parent | f749d3c44a2be409374dac41d0f0c359450b4859 (diff) | |
download | moa-sig-cf8769c549882f47bad496bc4ba9bd14a65429bc.tar.gz moa-sig-cf8769c549882f47bad496bc4ba9bd14a65429bc.tar.bz2 moa-sig-cf8769c549882f47bad496bc4ba9bd14a65429bc.zip |
update iaik_moa.jar to 2.03
update MOA-SP to support new IAIK_MOA API
6 files changed, 41 insertions, 15 deletions
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 <code>dsig:Manife <tr> <td align="center">0</td> <td align="center">VALID</td> - <td>Zertifikatsprüfung erfolgreich</td> + <td>Extended Validierung erfolgreich</td> </tr> <tr> <td align="center">1</td> <td align="center">INVALID</td> - <td>Zertifikatsprüfung nicht erfolgreich</td> + <td>Extended Validierung nicht erfolgreich.</td> </tr> <tr> <td align="center">2</td> <td align="center">INDETERMINATE</td> - <td>Zertifikatsstatus nicht ermittelbar</td> + <td>Ergebnis der extended Validierung ist aktuell nicht eindeutig ermittelbar, da zum Prüfzeitpunkt nicht alle Quellen erreichbar oder validierbar waren.</td> + </tr> + <tr> + <td align="center">3</td> + <td align="center">SKIPPED</td> + <td>Extended Validierung nicht durchgeführt</td> + </tr> + <tr> + <td align="center">4</td> + <td align="center">ERROR</td> + <td>Allgemeiner Fehler während der extended Validierung</td> </tr> </table> <p> </p> @@ -1092,6 +1102,10 @@ positive Ganzzahl repräsentiert, die auf das beinhaltende <code>dsig:Manife <td align="center">24</td> <td>Fehler</td> </tr> + <tr> + <td align="center">25</td> + <td>Die PAdES Signatur verwendet einen unbekannter SubFilter und kann somit nicht validiert werden.</td> + </tr> </table> <p> </p> <h4><a name="webservice_xmlrequests_pruefungxml_xmldsigmanifest"></a>2.1.4.3 Prüfung eines XMLDSIG-Manifests </h4> diff --git a/moaSig/libs/iaik_moa-2.03.jar b/moaSig/libs/iaik_moa-2.03.jar Binary files differindex d43c724..2771bfa 100644 --- a/moaSig/libs/iaik_moa-2.03.jar +++ b/moaSig/libs/iaik_moa-2.03.jar 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) { |