Correctly handle leap year in x509_date_is_valid()

This patch ensures that invalid dates on leap years with 100 or 400
years intervals are handled correctly.
diff --git a/ChangeLog b/ChangeLog
index 9e025da..6a1be98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@
    * Parse signature algorithm extension when renegotiating. Previously,
      renegotiated handshakes would only accept signatures using SHA-1
      regardless of the peer's preferences, or fail if SHA-1 was disabled.
+   * Fix leap year calculation in x509_date_is_valid() to ensure that invalid
+     dates on leap years with 100 and 400 intervals are handled correctly. Found
+     by Nicholas Wilson. #694
 
 = mbed TLS 1.3.21 branch released 2017-08-10