cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: CXF-7340 Add an option to specify the location of the signature element
Date Wed, 19 Apr 2017 14:33:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 41a97e477 -> be99c5301


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

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

This closes #263


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

Branch: refs/heads/master
Commit: be99c53015cb37a692d2e4dbe3682c7407f29b99
Parents: 41a97e4
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Tue Oct 25 14:42:56 2016 +0200
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Apr 19 15:32:44 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/be99c530/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 13cd047..28fae88 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;
@@ -79,4 +80,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/be99c530/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 904a92b..309dc57 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
@@ -333,6 +333,10 @@ public class XmlSecOutInterceptor extends AbstractPhaseInterceptor<Message>
{
             transform = sigProps.getSignatureC14nTransform();
         }
 
+        if (sigProps.getSignatureLocation() != null) {
+            properties.setSignaturePosition(sigProps.getSignatureLocation());
+        }
+        
         if (elementsToSign == null || elementsToSign.isEmpty()) {
             LOG.fine("No Elements to sign are specified, so the entire request is signed");
             SecurePart securePart =


Mime
View raw message