You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by we...@apache.org on 2005/10/10 17:44:07 UTC

svn commit: r312669 - /webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java

Author: werner
Date: Mon Oct 10 08:44:02 2005
New Revision: 312669

URL: http://svn.apache.org/viewcvs?rev=312669&view=rev
Log:
Some code cleanup

Modified:
    webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java

Modified: webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java?rev=312669&r1=312668&r2=312669&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/handler/WSHandler.java Mon Oct 10 08:44:02 2005
@@ -921,18 +921,24 @@
     }
 
     /**
-     * Evaluate whether a timestamp is considered valid on receiverside.
-     * Hook to allow subclasses to implement custom validation methods however they see fit.
-     * <p/>
-     * Policy used in this implementation:
-     * 1. The receiver can set its own time to live (besides from that set on sender side)
-     * 2. If the message was created before (now-ttl) the message is rejected
-     *
-     * @param timestamp  the timestamp that is validated
-     * @param timeToLive the limit on receiverside, the timestamp is validated against
-     * @return true if the timestamp is before (now-timeToLive), false otherwise
-     * @throws WSSecurityException
-     */
+	 * Evaluate whether a timestamp is considered valid on receiverside. Hook to
+	 * allow subclasses to implement custom validation methods however they see
+	 * fit.
+	 * 
+	 * Policy used in this implementation:
+	 * 
+	 * 1. The receiver can set its own time to live (besides from that set on
+	 * sender side)
+	 * 
+	 * 2. If the message was created before (now-ttl) the message is rejected
+	 * 
+	 * @param timestamp
+	 *            the timestamp that is validated
+	 * @param timeToLive
+	 *            the limit on receiverside, the timestamp is validated against
+	 * @return true if the timestamp is before (now-timeToLive), false otherwise
+	 * @throws WSSecurityException
+	 */
     protected boolean verifyTimestamp(Timestamp timestamp, int timeToLive) throws WSSecurityException {
 
         // Calculate the time that is allowed for the message to travel
@@ -961,7 +967,9 @@
             return false;
         }
 
-        log.debug("Validation of Timestamp: Everything is ok");
+        if (doDebug) {
+        	log.debug("Validation of Timestamp: Everything is ok");
+        }
         return true;
     }
     



---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org