Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 343B7200C70 for ; Wed, 19 Apr 2017 16:53:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 32CD6160B94; Wed, 19 Apr 2017 14:53:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 824B8160BAD for ; Wed, 19 Apr 2017 16:53:45 +0200 (CEST) Received: (qmail 60311 invoked by uid 500); 19 Apr 2017 14:53:44 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 60295 invoked by uid 99); 19 Apr 2017 14:53:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2017 14:53:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7100CE038B; Wed, 19 Apr 2017 14:53:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Wed, 19 Apr 2017 14:53:45 -0000 Message-Id: <6cfb679bdb7c4e3f9ea8f395d389c91b@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] cxf git commit: CXF-7340 Add an option to specify the location of the signature element archived-at: Wed, 19 Apr 2017 14:53:46 -0000 CXF-7340 Add an option to specify the location of the signature element Signed-off-by: Colm O hEigeartaigh 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 Authored: Tue Oct 25 14:42:56 2016 +0200 Committer: Colm O hEigeartaigh 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 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 { 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");