Fix length checks in X509_cmp_time to avoid out-of-bounds reads.