Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
d6b1f942b3 | |||
7eff6ea36a | |||
1ef3615a49 | |||
3653cdc797 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartacme",
|
"name": "@pushrocks/smartacme",
|
||||||
"version": "2.0.18",
|
"version": "2.0.20",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartacme",
|
"name": "@pushrocks/smartacme",
|
||||||
"version": "2.0.18",
|
"version": "2.0.20",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "acme implementation in TypeScript",
|
"description": "acme implementation in TypeScript",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -31,10 +31,8 @@ export class Cert extends plugins.smartdata.SmartDataDbDoc<Cert> implements inte
|
|||||||
|
|
||||||
constructor(optionsArg: ICert) {
|
constructor(optionsArg: ICert) {
|
||||||
super();
|
super();
|
||||||
this.created = optionsArg.created;
|
Object.keys(optionsArg).forEach(key => {
|
||||||
this.domainName = optionsArg.domainName;
|
this[key] = optionsArg[key];
|
||||||
this.privateKey = optionsArg.privateKey;
|
});
|
||||||
this.publicKey = optionsArg.publicKey;
|
|
||||||
this.csr = optionsArg.csr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ export class CertManager {
|
|||||||
public async retrieveCertificate(domainName: string): Promise<Cert> {
|
public async retrieveCertificate(domainName: string): Promise<Cert> {
|
||||||
await this.checkCerts();
|
await this.checkCerts();
|
||||||
const existingCertificate: Cert = await Cert.getInstance({
|
const existingCertificate: Cert = await Cert.getInstance({
|
||||||
name: domainName
|
domainName
|
||||||
});
|
});
|
||||||
|
|
||||||
if(existingCertificate) {
|
if(existingCertificate) {
|
||||||
|
Reference in New Issue
Block a user