Arm Mbed OS support forum

How often should I refresh a downloaded CA cert?

Newbie question. I’m using a language which embeds mbedtls (MicroPython), and I fetched my server’s certificate using the following command. MicroPython reads this cert on each bootup and uses the values therein for connecting. How can I know when it’s expired and it’s time to refresh it?

openssl s_client -connect -showcerts > securecoop.pem

Found the answer. Unbeknownst to me at the time, this is not specific to Mbed.

$ openssl x509 -enddate -noout -in securecoop.pem
notAfter=Jun 10 23:59:59 2022 GMT