cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1034486 - in /cxf/sandbox/wss4j-1.6-port/rt/ws/security/src: main/java/org/apache/cxf/ws/security/wss4j/ main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/ test/java/org/apache/cxf/ws/security/wss4j/
Date Fri, 12 Nov 2010 17:35:34 GMT
Author: coheigea
Date: Fri Nov 12 17:35:34 2010
New Revision: 1034486

URL: http://svn.apache.org/viewvc?rev=1034486&view=rev
Log:
Some updates following from the recent JDK 1.5 port of WSS4J-1.6-SNAPSHOT.

Modified:
    cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
    cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
    cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
    cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
    cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java

Modified: cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java?rev=1034486&r1=1034485&r2=1034486&view=diff
==============================================================================
--- cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
(original)
+++ cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/CryptoCoverageChecker.java
Fri Nov 12 17:35:34 2010
@@ -116,14 +116,14 @@ public class CryptoCoverageChecker exten
         final Collection<WSDataRef> signed = new HashSet<WSDataRef>();
         final Collection<WSDataRef> encrypted = new HashSet<WSDataRef>();
         
-        List<Object> results = CastUtils.cast(
+        List<WSHandlerResult> results = CastUtils.cast(
                 (List<?>) message.get(WSHandlerConstants.RECV_RESULTS));
         
-        for (Object result : results) {
-        
-            final WSHandlerResult wshr = (WSHandlerResult) result;
-            final Vector<Object> wsSecurityEngineSignResults = new Vector<Object>();
-            final Vector<Object> wsSecurityEngineEncResults = new Vector<Object>();
+        for (final WSHandlerResult wshr : results) {
+            final List<WSSecurityEngineResult> wsSecurityEngineSignResults = 
+                new Vector<WSSecurityEngineResult>();
+            final List<WSSecurityEngineResult> wsSecurityEngineEncResults = 
+                new Vector<WSSecurityEngineResult>();
             
             WSSecurityUtil.fetchAllActionResults(wshr.getResults(),
                     WSConstants.SIGN, wsSecurityEngineSignResults);
@@ -131,8 +131,7 @@ public class CryptoCoverageChecker exten
             WSSecurityUtil.fetchAllActionResults(wshr.getResults(),
                     WSConstants.ENCR, wsSecurityEngineEncResults);
             
-            for (Object o : wsSecurityEngineSignResults) {
-                WSSecurityEngineResult wser = (WSSecurityEngineResult) o;
+            for (WSSecurityEngineResult wser : wsSecurityEngineSignResults) {
             
                 List<WSDataRef> sl = CastUtils.cast((List<?>) wser
                         .get(WSSecurityEngineResult.TAG_DATA_REF_URIS));
@@ -149,9 +148,7 @@ public class CryptoCoverageChecker exten
                 }
             }
             
-            for (Object o : wsSecurityEngineEncResults) {
-                WSSecurityEngineResult wser = (WSSecurityEngineResult) o;
-            
+            for (WSSecurityEngineResult wser : wsSecurityEngineEncResults) {
                 List<WSDataRef> el = CastUtils.cast((List<?>) wser
                         .get(WSSecurityEngineResult.TAG_DATA_REF_URIS));
 

Modified: cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java?rev=1034486&r1=1034485&r2=1034486&view=diff
==============================================================================
--- cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
(original)
+++ cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
Fri Nov 12 17:35:34 2010
@@ -315,13 +315,6 @@ public class WSS4JInInterceptor extends 
                 WSSecurityEngineResult result = 
                     (WSSecurityEngineResult) signatureResults.get(i);
                 
-                X509Certificate returnCert = (X509Certificate)result
-                    .get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
-
-                if (returnCert != null && !verifyTrust(returnCert, reqData)) {
-                    LOG.warning("The certificate used for the signature is not trusted");
-                    throw new WSSecurityException(WSSecurityException.FAILED_CHECK);
-                }
                 msg.put(SIGNATURE_RESULT, result);
             }
         }

Modified: cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java?rev=1034486&r1=1034485&r2=1034486&view=diff
==============================================================================
--- cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
(original)
+++ cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
Fri Nov 12 17:35:34 2010
@@ -1743,7 +1743,7 @@ public abstract class AbstractBindingBui
         @Override
         public List addReferencesToSign(List references,
                 WSSecHeader secHeader) throws WSSecurityException {
-            final Vector<Object> unalteredReferences = new Vector<Object>();
+            final List<WSEncryptionPart> unalteredReferences = new Vector<WSEncryptionPart>();
 
             List uberReferences = new Vector();
             try {

Modified: cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java?rev=1034486&r1=1034485&r2=1034486&view=diff
==============================================================================
--- cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
(original)
+++ cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWss4JInOutTest.java
Fri Nov 12 17:35:34 2010
@@ -953,7 +953,7 @@ public class PolicyBasedWss4JInOutTest e
         assertNotNull(handlerResults);
         assertSame(handlerResults.size(), 1);
 
-        Vector<Object> protectionResults = new Vector<Object>();
+        List<WSSecurityEngineResult> protectionResults = new Vector<WSSecurityEngineResult>();
         WSSecurityUtil.fetchAllActionResults(handlerResults.get(0).getResults(),
                 WSConstants.ENCR, protectionResults);
         assertNotNull(protectionResults);

Modified: cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java?rev=1034486&r1=1034485&r2=1034486&view=diff
==============================================================================
--- cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
(original)
+++ cxf/sandbox/wss4j-1.6-port/rt/ws/security/src/test/java/org/apache/cxf/ws/security/wss4j/WSS4JInOutTest.java
Fri Nov 12 17:35:34 2010
@@ -287,8 +287,8 @@ public class WSS4JInOutTest extends Abst
         //
         // This should contain exactly 1 protection result
         //
-        final java.util.List<Object> protectionResults =
-            (java.util.List<Object>) handlerResults.get(0).getResults();
+        final java.util.List<WSSecurityEngineResult> protectionResults =
+            (java.util.List<WSSecurityEngineResult>) handlerResults.get(0).getResults();
         assertNotNull(protectionResults);
         assertSame(protectionResults.size(), 1);
         //
@@ -394,8 +394,8 @@ public class WSS4JInOutTest extends Abst
         //
         // This should contain exactly 2 protection results
         //
-        final java.util.List<Object> protectionResults =
-            (java.util.List<Object>) handlerResults.get(0).getResults();
+        final java.util.List<WSSecurityEngineResult> protectionResults =
+            (java.util.List<WSSecurityEngineResult>) handlerResults.get(0).getResults();
         assertNotNull(protectionResults);
         assertSame(protectionResults.size(), 2);
     }



Mime
View raw message