cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r790643 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j: AbstractWSS4JInterceptor.java WSS4JInInterceptor.java WSS4JOutInterceptor.java
Date Thu, 02 Jul 2009 16:19:53 GMT
Author: dkulp
Date: Thu Jul  2 16:19:52 2009
New Revision: 790643

URL: http://svn.apache.org/viewvc?rev=790643&view=rev
Log:
Fix SignatureConfirmation with the old interceptors which has never
worked due to looking in the wrong place for RECV_RESULTS and SND_SIGS.

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java?rev=790643&r1=790642&r2=790643&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java
Thu Jul  2 16:19:52 2009
@@ -150,6 +150,17 @@
         return MessageUtils.isRequestor(message);
     }  
 
+    protected boolean decodeEnableSignatureConfirmation(RequestData reqData) throws WSSecurityException
{
+
+        String value = getString(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION,
+                reqData.getMsgContext());
+
+        //we need the default to be false to not break older applications and such
+        if (value == null) {
+            return false;
+        }
+        return super.decodeEnableSignatureConfirmation(reqData);
+    }
 
     public Crypto loadSignatureCrypto(RequestData reqData) 
         throws WSSecurityException {

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=790643&r1=790642&r2=790643&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Thu Jul  2 16:19:52 2009
@@ -127,6 +127,19 @@
         return doc;
     }
     
+    @Override
+    public Object getProperty(Object msgContext, String key) {
+        // use the superclass first
+        Object result = super.getProperty(msgContext, key);
+        
+        // handle the special case of the SEND_SIGV
+        if (result == null 
+            && key == WSHandlerConstants.SEND_SIGV
+            && this.isRequestor((SoapMessage)msgContext)) {
+            result = ((SoapMessage)msgContext).getExchange().getOutMessage().get(key);
+        }               
+        return result;
+    }
     
     public void handleMessage(SoapMessage msg) throws Fault {
         SOAPMessage doc = getSOAPMessage(msg);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java?rev=790643&r1=790642&r2=790643&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
Thu Jul  2 16:19:52 2009
@@ -83,6 +83,7 @@
         this.mtomEnabled = allowMTOM;
     }
     
+
     @Override
     public Object getProperty(Object msgContext, String key) {
         // use the superclass first
@@ -96,6 +97,7 @@
         }               
         return result;
     }
+
     public void handleMessage(SoapMessage mc) throws Fault {
         //must turn off mtom when using WS-Sec so binary is inlined so it can
         //be properly signed/encrypted/etc...



Mime
View raw message