ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1560733 - in /webservices/wss4j/trunk: ws-security-common/src/main/java/org/apache/wss4j/common/util/ ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/ ws-security-dom/src/main/java/org/apache/wss4j/dom/util/ ws-security-stax/src...
Date Thu, 23 Jan 2014 16:40:10 GMT
Author: coheigea
Date: Thu Jan 23 16:40:09 2014
New Revision: 1560733

URL: http://svn.apache.org/r1560733
Log:
Minor refactor

Removed:
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/util/StringUtil.java
Modified:
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerConstants.java
    webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/ConfigurationConverter.java
    webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java?rev=1560733&r1=1560732&r2=1560733&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java
(original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandler.java
Thu Jan 23 16:40:09 2014
@@ -51,7 +51,6 @@ import org.apache.wss4j.common.crypto.Pa
 import org.apache.wss4j.common.ext.WSPasswordCallback;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.util.Loader;
-import org.apache.wss4j.common.util.StringUtil;
 import org.apache.wss4j.dom.message.WSSecHeader;
 import org.apache.wss4j.dom.message.token.SignatureConfirmation;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
@@ -1221,10 +1220,10 @@ public abstract class WSHandler {
                                List<WSEncryptionPart> parts, RequestData reqData)
         throws WSSecurityException {
         WSEncryptionPart encPart = null;
-        String[] rawParts = StringUtil.split(tmpS, ';');
+        String[] rawParts = tmpS.split(";");
 
         for (int i = 0; i < rawParts.length; i++) {
-            String[] partDef = StringUtil.split(rawParts[i], '}');
+            String[] partDef = rawParts[i].split("}");
 
             if (partDef.length == 1) {
                 if (doDebug) {

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerConstants.java?rev=1560733&r1=1560732&r2=1560733&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerConstants.java
(original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/WSHandlerConstants.java
Thu Jan 23 16:40:09 2014
@@ -101,7 +101,7 @@ public final class WSHandlerConstants {
     
     /**
      * This is an alternative to specifying an "action" String. This Object should be a
-     * list of HandlerAction objects, which associated an "action" Integer with a corresponding
+     * list of HandlerAction objects, which associate an "action" Integer with a corresponding
      * SecurityActionToken object. This allows for more control over keys etc. used for 
      * different actions.
      */

Modified: webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java?rev=1560733&r1=1560732&r2=1560733&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
(original)
+++ webservices/wss4j/trunk/ws-security-dom/src/main/java/org/apache/wss4j/dom/util/WSSecurityUtil.java
Thu Jan 23 16:40:09 2014
@@ -28,7 +28,6 @@ import org.apache.wss4j.dom.WSSecurityEn
 import org.apache.wss4j.dom.WSSConfig;
 import org.apache.wss4j.common.WSEncryptionPart;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.util.StringUtil;
 import org.apache.wss4j.common.util.XMLUtils;
 import org.apache.wss4j.dom.handler.HandlerAction;
 import org.apache.wss4j.dom.handler.WSHandlerConstants;
@@ -908,10 +907,10 @@ public final class WSSecurityUtil {
 
     public static List<Integer> decodeAction(String action) throws WSSecurityException
{
         List<Integer> actions = new ArrayList<Integer>();
-        if (action == null) {
+        if (action == null || "".equals(action)) {
             return actions;
         }
-        String single[] = StringUtil.split(action, ' ');
+        String single[] = action.split(" ");
         for (int i = 0; i < single.length; i++) {
             if (single[i].equals(WSHandlerConstants.NO_SECURITY)) {
                 return actions;
@@ -958,7 +957,8 @@ public final class WSSecurityUtil {
         if (action == null) {
             return actions;
         }
-        String single[] = StringUtil.split(action, ' ');
+        
+        String single[] = action.split(" ");
         for (int i = 0; i < single.length; i++) {
             if (single[i].equals(WSHandlerConstants.NO_SECURITY)) {
                 return actions;

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/ConfigurationConverter.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/ConfigurationConverter.java?rev=1560733&r1=1560732&r2=1560733&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/ConfigurationConverter.java
(original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/ConfigurationConverter.java
Thu Jan 23 16:40:09 2014
@@ -37,7 +37,6 @@ import org.apache.wss4j.common.crypto.Ja
 import org.apache.wss4j.common.crypto.PasswordEncryptor;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.util.Loader;
-import org.apache.wss4j.common.util.StringUtil;
 import org.apache.wss4j.stax.ext.WSSConfigurationException;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSConstants.UsernameTokenPasswordType;
@@ -82,11 +81,11 @@ public final class ConfigurationConverte
     ) {
         String action = getString(ConfigurationConstants.ACTION, config);
         
-        if (action == null) {
+        if (action == null || "".equals(action)) {
             return;
         }
         
-        String single[] = StringUtil.split(action, ' ');
+        String single[] = action.split(" ");
         List<Action> actions = new ArrayList<Action>();
         for (int i = 0; i < single.length; i++) {
             if (single[i].equals(ConfigurationConstants.USERNAME_TOKEN)) {
@@ -782,10 +781,10 @@ public final class ConfigurationConverte
     
     private static void splitEncParts(String tmpS, List<SecurePart> parts, String soapNS)
{
         SecurePart encPart = null;
-        String[] rawParts = StringUtil.split(tmpS, ';');
+        String[] rawParts = tmpS.split(";");
 
         for (int i = 0; i < rawParts.length; i++) {
-            String[] partDef = StringUtil.split(rawParts[i], '}');
+            String[] partDef = rawParts[i].split("}");
 
             if (partDef.length == 1) {
                 QName qname = new QName(soapNS, partDef[0].trim());

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java?rev=1560733&r1=1560732&r2=1560733&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java
(original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/impl/processor/input/DerivedKeyTokenInputHandler.java
Thu Jan 23 16:40:09 2014
@@ -136,15 +136,15 @@ public class DerivedKeyTokenInputHandler
                                 nonce,
                                 derivedKeyTokenType.getOffset().intValue()
                         );
-                        XMLSecurityConstants.AlgorithmUsage derivedKeyAlgoryithmUsage;
+                        XMLSecurityConstants.AlgorithmUsage derivedKeyAlgorithmUsage;
                         if (WSSConstants.Enc.equals(algorithmUsage)) {
-                            derivedKeyAlgoryithmUsage = WSSConstants.Enc_KD;
+                            derivedKeyAlgorithmUsage = WSSConstants.Enc_KD;
                         } else {
-                            derivedKeyAlgoryithmUsage = WSSConstants.Sig_KD;
+                            derivedKeyAlgorithmUsage = WSSConstants.Sig_KD;
                         }
                         AlgorithmSuiteSecurityEvent algorithmSuiteSecurityEvent = new AlgorithmSuiteSecurityEvent();
                         algorithmSuiteSecurityEvent.setAlgorithmURI(derivedKeyAlgorithm);
-                        algorithmSuiteSecurityEvent.setAlgorithmUsage(derivedKeyAlgoryithmUsage);
+                        algorithmSuiteSecurityEvent.setAlgorithmUsage(derivedKeyAlgorithmUsage);
                         algorithmSuiteSecurityEvent.setKeyLength(keyBytes.length * 8);
                         algorithmSuiteSecurityEvent.setCorrelationID(correlationID);
                         inputProcessorChain.getSecurityContext().registerSecurityEvent(algorithmSuiteSecurityEvent);



Mime
View raw message