aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at
diff options
context:
space:
mode:
Diffstat (limited to 'spss.server/src/at')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java12
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java17
2 files changed, 14 insertions, 15 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
index 185a8c511..e192b66a2 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
@@ -152,7 +152,7 @@ public class XMLSignatureVerificationInvoker {
supplements);
xmlSignature = buildXMLSignature(signatureEnvironment, request);
- // build the list of DataObjects
+ // build the list of DataObjects
dataObjectList = buildDataObjectList(supplements);
// build profile
@@ -301,8 +301,8 @@ public class XMLSignatureVerificationInvoker {
ConfigurationProvider config = context.getConfiguration();
List supplementProfiles = request.getSupplementProfiles();
- List supplements = new ArrayList();
if (supplementProfiles != null) {
+ List supplements = new ArrayList();
List mappedProfiles =
ProfileMapper.mapSupplementProfiles(supplementProfiles, config);
Iterator iter;
@@ -312,9 +312,11 @@ public class XMLSignatureVerificationInvoker {
(SupplementProfileExplicit) iter.next();
supplements.add(profile.getSupplementProfile());
}
+
+ return supplements;
}
- return supplements;
+ return null;
}
/**
@@ -351,7 +353,7 @@ public class XMLSignatureVerificationInvoker {
// validate that each ReferenceData object contains transforms specified
// in the corresponding SignatureManifestCheckParams/ReferenceInfo
- if (profile.checkSecurityLayerManifest()) {
+ if (request.getSignatureManifestCheckParams() != null) {
List refInfos =
request.getSignatureManifestCheckParams().getReferenceInfos();
List refDatas = filterReferenceInfos(result.getReferenceDataList());
@@ -401,7 +403,7 @@ public class XMLSignatureVerificationInvoker {
// validate the hashes contained in all the ReferenceInfo objects of the
// security layer manifest
- if (profile.checkSecurityLayerManifest()
+ if (request.getSignatureManifestCheckParams() != null
&& result.containsSecurityLayerManifest()) {
Map hashValues = buildTransformParameterHashValues(request);
Set transformParameterURIs =
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
index 858964c82..5df13a337 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
@@ -75,19 +75,16 @@ public class XMLSignatureVerificationProfileFactory {
profile.setIncludeHashInputData(request.getReturnHashInputData());
// set the security layer manifest check parameters
+ // and transformation supplements (if present)
checkParams = request.getSignatureManifestCheckParams();
+ profile.setCheckSecurityLayerManifest(true);
+ profile.setIncludeReferenceInputData(checkParams != null ? checkParams.getReturnReferenceInputData() : false);
if (checkParams != null) {
- List transformationSupplements;
-
- profile.setCheckSecurityLayerManifest(true);
- profile.setIncludeReferenceInputData(
- checkParams.getReturnReferenceInputData());
- transformationSupplements = buildTransformationSupplements();
- profile.setTransformationSupplements(transformationSupplements);
+ List transformationSupplements;
+ transformationSupplements = buildTransformationSupplements();
+ profile.setTransformationSupplements(transformationSupplements);
} else {
- profile.setCheckSecurityLayerManifest(false);
- profile.setIncludeReferenceInputData(false);
- profile.setTransformationSupplements(Collections.EMPTY_LIST);
+ profile.setTransformationSupplements(Collections.EMPTY_LIST);
}
return profile;