/// <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)); }
/// <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)); }