fix(core): update

This commit is contained in:
Philipp Kunz 2019-01-17 22:50:21 +01:00
parent 8e255938b5
commit e04b23aceb

View File

@ -139,6 +139,20 @@ export class SmartAcme {
await this.certmanager.smartdataDb.close(); 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<Cert> { public async getCertificateForDomain(domainArg: string): Promise<Cert> {
const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(domainArg); const certDomain = this.certmatcher.getCertificateDomainNameByDomainName(domainArg);
const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomain); const retrievedCertificate = await this.certmanager.retrieveCertificate(certDomain);