This is needed to compare to current time and see how much is left.
I investigated the matters and it seems people are inventing scripts getting date/time in text from the openssl output, converting it into some form to compare (unix timestamp). I also learnt that certificates themselves contain the date in kind of unit timestamp format in UTC timezone.
So what is the deal of getting this information directly from the certificate instead of having it converted into the human readable format and then converted back to a number?
I do not see such option in openssl application.
What is the easiest way to get number of (let's say) seconds of cert time left without going into such a mess taking time and computing power and requiring questionably portable scripts?
Edit: thanks for the comment. I am working with the embedded platform (openwrt), there's no browser and no user interface, only command line. Certificates are just set of .pem files stored locally. Check will be performed using scripts - and the result will be sent in binary through another channel for the monitoring.
I can do openssl x509 -in cert.pem -enddate -noout
and then parse out the text, convert it to number etc but it is ugly to say the least.