You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/04/19 14:53:45 UTC

[2/3] cxf git commit: CXF-7340 Add an option to specify the location of the signature element

CXF-7340 Add an option to specify the location of the signature element

Signed-off-by: Colm O hEigeartaigh <co...@apache.org>

This closes #263

# Conflicts:
#	rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d1c82251
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d1c82251
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d1c82251

Branch: refs/heads/3.1.x-fixes
Commit: d1c82251965fcac68c9829844870e726c73e9e25
Parents: a78c589
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Tue Oct 25 14:42:56 2016 +0200
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Apr 19 15:34:22 2017 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/rs/security/xml/SignatureProperties.java  | 8 ++++++++
 .../org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java | 7 +++++++
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d1c82251/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/SignatureProperties.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/SignatureProperties.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/SignatureProperties.java
index 235d70e..412e40e 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/SignatureProperties.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/SignatureProperties.java
@@ -28,6 +28,7 @@ public class SignatureProperties {
     private String signatureKeyIdType;
     private String signatureKeyName;
     private Map<String, String> keyNameAliasMap;
+    private Integer signatureLocation;
 
     public void setSignatureAlgo(String signatureAlgo) {
         this.signatureAlgo = signatureAlgo;
@@ -95,4 +96,11 @@ public class SignatureProperties {
         this.keyNameAliasMap = keyNameAliasMap;
     }
 
+    public Integer getSignatureLocation() {
+        return signatureLocation;
+    }
+
+    public void setSignatureLocation(Integer signatureLocation) {
+        this.signatureLocation = signatureLocation;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1c82251/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java
index 9018772..b4abf6b 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecOutInterceptor.java
@@ -332,6 +332,13 @@ public class XmlSecOutInterceptor extends AbstractPhaseInterceptor<Message> {
         if (sigProps.getSignatureC14nTransform() != null) {
             transform = sigProps.getSignatureC14nTransform();
         }
+<<<<<<< HEAD
+=======
+
+        if (sigProps.getSignatureLocation() != null) {
+            properties.setSignaturePosition(sigProps.getSignatureLocation());
+        }
+>>>>>>> be99c53... CXF-7340 Add an option to specify the location of the signature element
         
         if (elementsToSign == null || elementsToSign.isEmpty()) {
             LOG.fine("No Elements to sign are specified, so the entire request is signed");