From e04b23acebe70a5f89771e4fafccb6197ce4854f Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Thu, 17 Jan 2019 22:50:21 +0100 Subject: [PATCH] fix(core): update --- ts/smartacme.classes.smartacme.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ts/smartacme.classes.smartacme.ts b/ts/smartacme.classes.smartacme.ts index 4d0f482..1e0469e 100644 --- a/ts/smartacme.classes.smartacme.ts +++ b/ts/smartacme.classes.smartacme.ts @@ -139,6 +139,20 @@ export class SmartAcme { await this.certmanager.smartdataDb.close(); } + /** + * gets a certificate + * it runs through the following steps + * + * * look in the database + * * if in the database return it + * * of not in the database announce it + * * then get it from letsencrypt + * * store it + * * remove it from the pending map (which it go onto by announcing it) + * * retrieve it from the databse and return it + * + * @param domainArg + */ public async getCertificateForDomain(domainArg: string): Promise { const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(domainArg); const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomain);