コード例 #1
0
        /// <summary>
        /// Null fields are considered to be valid
        /// </summary>
        private static bool ValidateNotBefore(DateTime?notBefore, DateTime now, TimeSpan allowedClockSkew)
        {
            if (notBefore == null)
            {
                return(true);
            }

            return(TimeRestrictionValidation.NotBeforeValid(notBefore.Value, now, allowedClockSkew));
        }
コード例 #2
0
        /// <summary>
        /// Handle allowed clock skew by increasing notOnOrAfter with allowedClockSkew
        /// </summary>
        private static bool ValidateNotOnOrAfter(DateTime?notOnOrAfter, DateTime now, TimeSpan allowedClockSkew)
        {
            if (notOnOrAfter == null)
            {
                return(true);
            }

            return(TimeRestrictionValidation.NotOnOrAfterValid(notOnOrAfter.Value, now, allowedClockSkew));
        }