[Issue#] N/A
[Bug] N/A
[Cause] N/A
[Solution] N/A
[Verification] Run all security-server tests.
#define SECURITY_SERVER_HISTORY_FILE_NAME "history"
#define SECURITY_SERVER_MAX_PASSWORD_LEN 32
#define SECURITY_SERVER_HASHED_PWD_LEN 32 /* SHA256 */
-#define SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_SECOND 1
+#define SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_SECOND 1 /* Deprecated. Will be removed. */
+#define SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_MICROSECOND 500000 /* = 500 milliseconds */
+
#define SECURITY_SERVER_MAX_PASSWORD_HISTORY 50
#define SECURITY_SERVER_NUM_THREADS 10
interval_sec = cur_try.tv_sec - prev_try.tv_sec;
interval_usec = cur_try.tv_usec - prev_try.tv_usec;
prev_try = cur_try;
- if(interval_sec > SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_SECOND)
+ if(interval_sec == 0
+ && interval_usec > SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_MICROSECOND)
return SECURITY_SERVER_SUCCESS;
- if(interval_sec == SECURITY_SERVER_PASSWORD_RETRY_TIMEOUT_SECOND
- && interval_usec >= 0)
+ if(interval_sec > 0)
return SECURITY_SERVER_SUCCESS;
SEC_SVR_DBG("%s", "retry timer hit");