cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1511409 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Date Wed, 07 Aug 2013 17:19:59 GMT
Author: coheigea
Date: Wed Aug  7 17:19:58 2013
New Revision: 1511409

URL: http://svn.apache.org/r1511409
Log:
Minor cleanup for encryption

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

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1511409&r1=1511408&r2=1511409&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Wed Aug  7 17:19:58 2013
@@ -1665,14 +1665,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