cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1560676 - in /cxf/trunk: rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
Date Thu, 23 Jan 2014 13:04:49 GMT
Author: coheigea
Date: Thu Jan 23 13:04:48 2014
New Revision: 1560676

URL: http://svn.apache.org/r1560676
Log:
Fixing some Kerberos streaming tests

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
    cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java?rev=1560676&r1=1560675&r2=1560676&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
Thu Jan 23 13:04:48 2014
@@ -322,11 +322,17 @@ public class KerberosTokenInterceptorPro
             try {
                 Map<String, Key> secretKeys = kerberosToken.getSecretKey();
                 if (secretKeys != null) {
+                    SecretKey foundKey = null;
                     for (String key : kerberosToken.getSecretKey().keySet()) {
                         if (secretKeys.get(key) instanceof SecretKey) {
-                            return (SecretKey)secretKeys.get(key);
+                            SecretKey secretKey = (SecretKey)secretKeys.get(key);
+                            if (foundKey == null
+                                || secretKey.getEncoded().length > foundKey.getEncoded().length)
{
+                                foundKey = secretKey;
+                            }
                         }
                     }
+                    return foundKey;
                 }
             } catch (XMLSecurityException e) {
                 LOG.fine(e.getMessage());

Modified: cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java?rev=1560676&r1=1560675&r2=1560676&view=diff
==============================================================================
--- cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
(original)
+++ cxf/trunk/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/kerberos/KerberosTokenTest.java
Thu Jan 23 13:04:48 2014
@@ -374,7 +374,8 @@ public class KerberosTokenTest extends A
         }
 
         // TODO Streaming support
-        if (!test.isStreaming()) {
+        // TODO Kerberos derived regression on streaming inbound
+        if (!STAX_PORT.equals(test.getPort()) && !test.isStreaming()) {
             kerberosPort.doubleIt(25);
         }
         



Mime
View raw message