To avoid possible time_t overflow use X509_time_adj_ex()