Index: openssl-1.0.1r/apps/req.c =================================================================== --- openssl-1.0.1r.orig/apps/req.c 2016-01-28 21:38:30.000000000 +0800 +++ openssl-1.0.1r/apps/req.c 2016-02-16 16:57:55.213749508 +0800 @@ -799,10 +799,17 @@ if (!X509_set_issuer_name(x509ss, X509_REQ_get_subject_name(req))) goto end; +/* __ZyXEL__, Albert, 20151118, Auto generate unique SSH & CA keys */ +#ifdef ZYXEL_HTTPD_SSL_GENKEY + /* Lets just make it 12:00am GMT, Jan 1 2015 - 2025*/ + ASN1_UTCTIME_set_string(X509_get_notBefore(x509ss),"150101120000Z"); + ASN1_UTCTIME_set_string(X509_get_notAfter(x509ss) ,"250101120000Z"); +#else if (!X509_gmtime_adj(X509_get_notBefore(x509ss), 0)) goto end; if (!X509_time_adj_ex(X509_get_notAfter(x509ss), days, 0, NULL)) goto end; +#endif if (!X509_set_subject_name (x509ss, X509_REQ_get_subject_name(req))) goto end;