cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r775973 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
Date Mon, 18 May 2009 14:48:42 GMT
Author: dkulp
Date: Mon May 18 14:48:42 2009
New Revision: 775973

URL: http://svn.apache.org/viewvc?rev=775973&view=rev
Log:
Fix issues with Sign only not getting a crypto object, particularly for
Asym binding.

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

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java?rev=775973&r1=775972&r2=775973&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
Mon May 18 14:48:42 2009
@@ -216,13 +216,16 @@
                 }
                 Object s = message.getContextualProperty(SecurityConstants.SIGNATURE_PROPERTIES);
                 Object e = message.getContextualProperty(SecurityConstants.ENCRYPT_PROPERTIES);
-                if (e != null) {
-                    message.put("SignaturePropRefId", "RefId-" + e.toString());
-                    message.put("RefId-" + e.toString(), getProps(e, message));
-                }
                 if (s != null) {
                     message.put("decryptionPropRefId", "RefId-" + s.toString());
                     message.put("RefId-" + s.toString(), getProps(s, message));
+                    if (e == null) {
+                        e = s;
+                    }
+                }
+                if (e != null) {
+                    message.put("SignaturePropRefId", "RefId-" + e.toString());
+                    message.put("RefId-" + e.toString(), getProps(e, message));
                 }
             }
         }
@@ -246,7 +249,11 @@
                 Object s = message.getContextualProperty(SecurityConstants.SIGNATURE_PROPERTIES);
                 Object e = message.getContextualProperty(SecurityConstants.ENCRYPT_PROPERTIES);
                 if (abinding.getProtectionToken() != null) {
-                    s = e;
+                    if (e != null) {
+                        s = e;
+                    } else if (s != null) {
+                        e = s;
+                    }
                 }
                 if (isRequestor(message)) {
                     if (e != null) {



Mime
View raw message