What does CONFIG_MBEDTLS_HAVE_TIME_DATE exactly do?
Posted: Sun Jan 03, 2021 12:20 am
Hello!
I'm working on a project implementing my own OTA application similar to simple_ota example found on Github. I was wondering about how can I check whether the certificate used is expired, and I found this thread on this forum: viewtopic.php?t=7585. I understand that by enabling CONFIG_MBEDTLS_HAVE_TIME_DATE in menuconfig, this check can be made. I also read the documentation that says:
I'm working on a project implementing my own OTA application similar to simple_ota example found on Github. I was wondering about how can I check whether the certificate used is expired, and I found this thread on this forum: viewtopic.php?t=7585. I understand that by enabling CONFIG_MBEDTLS_HAVE_TIME_DATE in menuconfig, this check can be made. I also read the documentation that says:
My question is: How will this time later be stored on the device? After enabling this option, will the device work as a clock, as well?System has time.h and time(), gmtime() and the clock is correct. The time needs to be correct (not necessarily very accurate, but at least the date should be correct). This is used to verify the validity period of X.509 certificates.
It is suggested that you should get the real time by “SNTP”.