Thank you for the feedback. You are right, checking the whole chain is important.
I'm already partially supporting this but need to do few changes.
The intermediate certificates returned when making the request are checked. The system will use the earliest expiration time.
However, the root certificate (which is stored locally) is not checked.
I'll add the feature and update the documentation.
Thanks.