cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/3] git commit: Minor changes to how tokens are referenced
Date Mon, 19 May 2014 11:00:51 GMT
Minor changes to how tokens are referenced

Conflicts:
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java


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

Branch: refs/heads/2.7.x-fixes
Commit: 165cb0c29879b5bde16bbe7fda03a8bc06c96b61
Parents: c428da8
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon May 19 11:34:09 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon May 19 11:43:00 2014 +0100

----------------------------------------------------------------------
 .../policyhandlers/AbstractBindingBuilder.java    | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/165cb0c2/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index 5f3cde9..35c678a 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -1577,23 +1577,37 @@ public abstract class AbstractBindingBuilder {
         policyAsserted(wrapper);
         
         if (!tokenTypeSet) {
+<<<<<<< HEAD
             if (token.getInclusion() == SPConstants.IncludeTokenType.INCLUDE_TOKEN_NEVER)
{
+=======
+            boolean requestor = isRequestor();
+            if (token.getIncludeTokenType() == IncludeTokenType.INCLUDE_TOKEN_NEVER
+                || token instanceof X509Token 
+                && ((token.getIncludeTokenType() == IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_RECIPIENT
+                    && !requestor) 
+                || (token.getIncludeTokenType() == IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_INITIATOR
+                    && requestor))) {
+>>>>>>> 1091ca3... Minor changes to how tokens are referenced
                 Wss10 wss = getWss10();
                 policyAsserted(wss);
                 if (wss == null || wss.isMustSupportRefKeyIdentifier()) {
                     secBase.setKeyIdentifierType(WSConstants.SKI_KEY_IDENTIFIER);
                 } else if (wss.isMustSupportRefIssuerSerial()) {
                     secBase.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
-                } else if (wss instanceof Wss11
-                                && ((Wss11) wss).isMustSupportRefThumbprint()) {
+                } else if (wss instanceof Wss11 && ((Wss11) wss).isMustSupportRefThumbprint())
{
                     secBase.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
+                } else {
+                    secBase.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
                 }
+<<<<<<< HEAD
             } else if (token.getInclusion() == SPConstants.IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_RECIPIENT
                 && !isRequestor() && token instanceof X509Token) {
                 secBase.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
             } else if (token.getInclusion() == SPConstants.IncludeTokenType.INCLUDE_TOKEN_ALWAYS_TO_INITIATOR
                 && isRequestor() && token instanceof X509Token) {
                 secBase.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
+=======
+>>>>>>> 1091ca3... Minor changes to how tokens are referenced
             } else {
                 secBase.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE);
             }


Mime
View raw message