You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Abandoned due to flaw: If the old certificate was retrieved, it would not match the newly generated key and would result in an error
Please can you add another option to the client.auto() function called renewIfExpired.
It will have the following properties:
string data type.
contains the directory path of a certificate.
return value:
if the certificate in the specified directory has expired, a new certificate is returned.
if the certificate in the specified directory is still valid, it is returned.
default value: null(new certificate is always generated).
prevents the rate limit from being reached from unnecessary repeated certificate requests.
allows the user to use their own certificate and have node-acme-client as a fallback to generate a certificate in case their certificate expires.
Possible Implementation
if (renewIfExpired) {
if (fs.existsSync(renewIfExpired)) {
var cert = fs.readFileSync(renewIfExpired);
var expiry = (new Date((await ACME.forge.readCertificateInfo(cert)).notAfter)).valueOf();
var time = (new Date()).valueOf();
if (expiry >= time) {
return cert;
}
} else {
// ERROR: file does not exist
}
}
// Continue certificate generation
By the way, thank you so much for such a great package!
I really appreciate the sophisticated code, clear documentation and constant bug fixes (all of the other major ACME clients are either really complicated or have serious bugs).
The text was updated successfully, but these errors were encountered:
Please can you add another option to the
client.auto()
function calledrenewIfExpired
.It will have the following properties:
string
data type.return
value:null
(new certificate is always generated).Possible Implementation
The text was updated successfully, but these errors were encountered: