aboutsummaryrefslogtreecommitdiff
path: root/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-06-07 14:57:27 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2016-06-07 14:57:27 +0200
commit606fd125e82b532f2e75dc787edb1f535dacfae9 (patch)
tree72b81de83914e2df3823015310192eef1f21fe87 /moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
parent4d0c73640c083a800060863309129960f44fc281 (diff)
downloadmoa-sig-606fd125e82b532f2e75dc787edb1f535dacfae9.tar.gz
moa-sig-606fd125e82b532f2e75dc787edb1f535dacfae9.tar.bz2
moa-sig-606fd125e82b532f2e75dc787edb1f535dacfae9.zip
3.0.0-RC2 signature form results adapted
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java')
-rw-r--r--moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java60
1 files changed, 9 insertions, 51 deletions
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 bea66b0..5d7b852 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
@@ -64,6 +64,7 @@ import at.gv.egovernment.moa.spss.server.logging.IaikLog;
import at.gv.egovernment.moa.spss.server.logging.TransactionId;
import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.util.AdESResultUtils;
import at.gv.egovernment.moa.spss.util.CertificateUtils;
import at.gv.egovernment.moa.spss.util.MessageProvider;
import at.gv.egovernment.moa.spss.util.QCSSCDResult;
@@ -74,8 +75,8 @@ import at.gv.egovernment.moaspss.logging.LoggingContextManager;
import at.gv.egovernment.moaspss.util.CollectionUtils;
import at.gv.egovernment.moaspss.util.Constants;
import iaik.server.ConfigurationException;
+import iaik.server.modules.AdESConstants;
import iaik.server.modules.AdESFormVerificationResult;
-import iaik.server.modules.AdESVerificationResult;
import iaik.server.modules.IAIKException;
import iaik.server.modules.IAIKRuntimeException;
import iaik.server.modules.SignatureVerificationProfile;
@@ -728,6 +729,7 @@ public class XMLSignatureVerificationInvoker {
List adesList = new ArrayList();
+ /*
checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_LTA),
SignatureVerificationProfile.LEVEL_LTA, adesList);
checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_LT),
@@ -736,60 +738,16 @@ public class XMLSignatureVerificationInvoker {
SignatureVerificationProfile.LEVEL_T, adesList);
checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_B),
SignatureVerificationProfile.LEVEL_B, adesList);
-
- return adesList;
- }
-
- private void checkSubResult(SignatureVerificationResult subResult, String level, List adesList) throws ConfigurationException {
- if (subResult != null) {
- Logger.info("Checking Level: " + level);
- try {
- AdESFormResultsImpl adESFormResultsImpl = new AdESFormResultsImpl();
- adESFormResultsImpl.setCode(subResult.getResultCode().getCode());
- adESFormResultsImpl.setInfo(subResult.getInfo());
- adESFormResultsImpl.setName(subResult.getName());
-
- adesList.add(adESFormResultsImpl);
- } catch (NullPointerException e) {
- Logger.warn("Catching NullPointer Exception, of invalid? Form Results", e);
- }
- }
- }
-
- private List getAdESResult(AdESFormVerificationResult adesFormVerification) {
- if (adesFormVerification == null) {
- // no form information
- return null;
- }
-
- List adesList = new ArrayList();
-
- checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_LTA),
- SignatureVerificationProfile.LEVEL_LTA, adesList);
- checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_LT),
+ */
+
+ AdESResultUtils.checkSubResult(adesFormVerification.getSubResult(AdESConstants.LONG_TERM_VALIDATION),
SignatureVerificationProfile.LEVEL_LT, adesList);
- checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_T),
+ AdESResultUtils.checkSubResult(adesFormVerification.getSubResult(AdESConstants.ADES_T_VALIDATION),
SignatureVerificationProfile.LEVEL_T, adesList);
- checkSubResult(adesFormVerification.getSubResult(SignatureVerificationProfile.LEVEL_B),
+ AdESResultUtils.checkSubResult(adesFormVerification.getSubResult("basic report"),
SignatureVerificationProfile.LEVEL_B, adesList);
-
+
return adesList;
}
- private void checkSubResult(AdESVerificationResult subResult, String level, List adesList) {
- if (subResult != null) {
- Logger.info("Checking Level: " + level);
- try {
- AdESFormResultsImpl adESFormResultsImpl = new AdESFormResultsImpl();
- adESFormResultsImpl.setCode(subResult.getResultCode());
- adESFormResultsImpl.setInfo(subResult.getInfo());
- adESFormResultsImpl.setName(subResult.getName());
-
- adesList.add(adESFormResultsImpl);
- } catch (NullPointerException e) {
- Logger.warn("Catching NullPointer Exception, of invalid? Form Results", e);
- }
- }
- }
-
}