cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1352658 - in /cxf/branches/2.6.x-fixes: ./ rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/
Date Thu, 21 Jun 2012 19:37:21 GMT
Author: gmazza
Date: Thu Jun 21 19:37:20 2012
New Revision: 1352658

URL: http://svn.apache.org/viewvc?rev=1352658&view=rev
Log:
Recording revisions 1352474 via  svn from
https://svn.apache.org/repos/asf/cxf/trunk


Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
    cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java

Propchange: cxf/branches/2.6.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.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.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1352658&r1=1352657&r2=1352658&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Thu Jun 21 19:37:20 2012
@@ -1590,7 +1590,7 @@ public abstract class AbstractBindingBui
             policyNotAsserted(token, "No " + (sign ? "signature" : "encryption") + " crypto
object found.");
         }
         if (encrUser == null || "".equals(encrUser)) {
-            policyNotAsserted(token, "No " + (sign ? "signature" : "encryption") + " username
found.");
+            policyNotAsserted(token, "A " + (sign ? "signature" : "encryption") + " username
needs to be declared.");
         }
         if (WSHandlerConstants.USE_REQ_SIG_CERT.equals(encrUser)) {
             List<WSHandlerResult> results = 

Modified: cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java?rev=1352658&r1=1352657&r2=1352658&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
Thu Jun 21 19:37:20 2012
@@ -37,6 +37,7 @@ import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.ws.policy.AssertionInfo;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
+import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.policy.SPConstants;
 import org.apache.cxf.ws.security.policy.model.AlgorithmSuite;
 import org.apache.cxf.ws.security.policy.model.AsymmetricBinding;
@@ -409,6 +410,11 @@ public class AsymmetricBindingHandler ex
                     } else {
                         setEncryptionUser(encr, recToken, false, crypto);
                     }
+                    if (!encr.isCertSet() && crypto == null) {
+                        policyNotAsserted(recToken, "Missing security configuration. "
+                                + "Make sure jaxws:client element is configured " 
+                                + "with a " + SecurityConstants.ENCRYPT_PROPERTIES + " value.");
+                    }
                     encr.setSymmetricEncAlgorithm(algorithmSuite.getEncryption());
                     encr.setKeyEncAlgo(algorithmSuite.getAsymmetricKeyWrap());
                     encr.prepare(saaj.getSOAPPart(), crypto);



Mime
View raw message