cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1511411 - /cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Date Wed, 07 Aug 2013 17:30:56 GMT
Author: coheigea
Date: Wed Aug  7 17:30:56 2013
New Revision: 1511411

URL: http://svn.apache.org/r1511411
Log:
Merged revisions 1511409 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1511409 | coheigea | 2013-08-07 18:19:58 +0100 (Wed, 07 Aug 2013) | 2 lines

  Minor cleanup for encryption

........

Modified:
    cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java

Modified: cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1511411&r1=1511410&r2=1511411&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Wed Aug  7 17:30:56 2013
@@ -1620,14 +1620,12 @@ public abstract class AbstractBindingBui
         String encrUser = (String)message.getContextualProperty(sign 
                                                                 ? SecurityConstants.SIGNATURE_USERNAME
                                                                 : SecurityConstants.ENCRYPT_USERNAME);
-        if (crypto != null && encrUser == null) {
+        if (crypto != null && (encrUser == null || "".equals(encrUser))) {
             try {
                 encrUser = crypto.getDefaultX509Identifier();
             } catch (WSSecurityException e1) {
                 throw new Fault(e1);
             }
-        } else if (encrUser == null || "".equals(encrUser)) {
-            policyNotAsserted(token, "No " + (sign ? "signature" : "encryption") + " crypto
object found.");
         }
         if (encrUser == null || "".equals(encrUser)) {
             policyNotAsserted(token, "A " + (sign ? "signature" : "encryption") + " username
needs to be declared.");



Mime
View raw message