cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject git commit: [CXF-5892] Ensure EncryptedKey references BST before it
Date Tue, 22 Jul 2014 10:49:02 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 939b49b4b -> 4d7fc38d6


[CXF-5892] Ensure EncryptedKey references BST before it


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

Branch: refs/heads/2.7.x-fixes
Commit: 4d7fc38d60d0edab7add4891b8d5d6c9237e78e6
Parents: 939b49b
Author: Alessio Soldano <asoldano@redhat.com>
Authored: Tue Jul 22 12:41:55 2014 +0200
Committer: Alessio Soldano <asoldano@redhat.com>
Committed: Tue Jul 22 12:41:55 2014 +0200

----------------------------------------------------------------------
 .gitmergeinfo                                             |  1 +
 .../wss4j/policyhandlers/AsymmetricBindingHandler.java    | 10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4d7fc38d/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index b43e27a..a5a9cb3 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -149,6 +149,7 @@ B 1ad113a2118493a377b95e7ef6b5942aba95fc3b
 B 1b0e2fe2d41956f2a5936be6e58da5fa9792213b
 B 1b0f8ebc18b0be39eb7ea2d803d6f097184430ac
 B 1b4a1b6db93b6c3dbbf0da39c9621ef57b82f76b
+B 1bcb4ec0d19267365535340365c7d64a4f9629f4
 B 1bd380a4c9269ce42b635a260976855ac2a993cf
 B 1bdcc6c08ebd79dff682e69d3141737a5d953597
 B 1c1441f3b3cfc8726862b3486c62ccf9171d9443

http://git-wip-us.apache.org/repos/asf/cxf/blob/4d7fc38d/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
index ef7db8d..87fe395 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
@@ -438,10 +438,6 @@ public class AsymmetricBindingHandler extends AbstractBindingBuilder
{
                     encr.setKeyEncAlgo(algorithmSuite.getAsymmetricKeyWrap());
                     encr.prepare(saaj.getSOAPPart(), crypto);
                     
-                    if (encr.getBSTTokenId() != null) {
-                        encr.prependBSTElementToHeader(secHeader);
-                    }
-                    
                     Element encryptedKeyElement = encr.getEncryptedKeyElement();
                                        
                     //Encrypt, get hold of the ref list and add it
@@ -455,6 +451,12 @@ public class AsymmetricBindingHandler extends AbstractBindingBuilder
{
                         encryptedKeyElement.appendChild(refList);
                     }
                     this.addEncryptedKeyElement(encryptedKeyElement);
+
+                    //Put BST before EncryptedKey element
+                    if (encr.getBSTTokenId() != null) {
+                        encr.prependBSTElementToHeader(secHeader);
+                    }
+
                     return encr;
                 } catch (WSSecurityException e) {
                     LOG.log(Level.FINE, e.getMessage(), e);


Mime
View raw message