Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
6be2866ddd | |||
ab55d3c91a |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartacme",
|
||||
"version": "3.0.3",
|
||||
"version": "3.0.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartacme",
|
||||
"version": "3.0.3",
|
||||
"version": "3.0.4",
|
||||
"private": false,
|
||||
"description": "acme with an easy yet powerful interface in TypeScript",
|
||||
"main": "dist/index.js",
|
||||
|
@ -114,9 +114,6 @@ export class SmartAcme {
|
||||
const certDomainName = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
|
||||
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomainName);
|
||||
|
||||
const shouldberenewed = retrievedCertificate.shouldBeRenewed();
|
||||
const isStillValid = retrievedCertificate.isStillValid();
|
||||
|
||||
if (!retrievedCertificate && await this.certmanager.interestMap.checkInterest(certDomainName)) {
|
||||
const existingCertificateInterest = this.certmanager.interestMap.findInterest(certDomainName);
|
||||
const certificate = existingCertificateInterest.interestFullfilled;
|
||||
@ -128,7 +125,7 @@ export class SmartAcme {
|
||||
}
|
||||
|
||||
// lets make sure others get the same interest
|
||||
await this.certmanager.interestMap.addInterest(certDomainName);
|
||||
const currentDomainInterst = await this.certmanager.interestMap.addInterest(certDomainName);
|
||||
|
||||
|
||||
/* Place new order */
|
||||
@ -208,6 +205,8 @@ export class SmartAcme {
|
||||
});
|
||||
|
||||
const newCertificate = await this.certmanager.retrieveCertificate(certDomainName);
|
||||
currentDomainInterst.fullfillInterest(newCertificate);
|
||||
currentDomainInterst.destroy();
|
||||
return newCertificate;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user