mbedtls_x509_time_cmp() compare mbedtls_x509_time
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
diff --git a/include/mbedtls/x509.h b/include/mbedtls/x509.h
index df6d762..ac8ff9a 100644
--- a/include/mbedtls/x509.h
+++ b/include/mbedtls/x509.h
@@ -367,6 +367,18 @@
int mbedtls_x509_serial_gets(char *buf, size_t size, const mbedtls_x509_buf *serial);
/**
+ * \brief Compare pair of mbedtls_x509_time.
+ *
+ * \param t1 mbedtls_x509_time to compare
+ * \param t2 mbedtls_x509_time to compare
+ *
+ * \return < 0 if t1 is before t2
+ * 0 if t1 equals t2
+ * > 0 if t1 is after t2
+ */
+int mbedtls_x509_time_cmp(const mbedtls_x509_time *t1, const mbedtls_x509_time *t2);
+
+/**
* \brief Check a given mbedtls_x509_time against the system time
* and tell if it's in the past.
*