mirror of https://github.com/certd/certd
refactor: dir with suffix
parent
0a64e5fa67
commit
8f1886a585
|
@ -1,9 +1,9 @@
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import crypto from 'crypto'
|
// import crypto from 'crypto'
|
||||||
// eslint-disable-next-line no-unused-vars
|
// // eslint-disable-next-line no-unused-vars
|
||||||
function md5 (content) {
|
// function md5 (content) {
|
||||||
return crypto.createHash('md5').update(content).digest('hex')
|
// return crypto.createHash('md5').update(content).digest('hex')
|
||||||
}
|
// }
|
||||||
export class CertStore {
|
export class CertStore {
|
||||||
constructor ({ store, email, domains }) {
|
constructor ({ store, email, domains }) {
|
||||||
this.store = store
|
this.store = store
|
||||||
|
@ -11,7 +11,7 @@ export class CertStore {
|
||||||
this.domains = domains
|
this.domains = domains
|
||||||
this.domain = this.getMainDomain(this.domains)
|
this.domain = this.getMainDomain(this.domains)
|
||||||
this.safetyDomain = this.getSafetyDomain(this.domain)
|
this.safetyDomain = this.getSafetyDomain(this.domain)
|
||||||
this.domainDir = this.safetyDomain + '-' + md5(this.getDomainStr(this.domains))
|
this.domainDir = this.safetyDomain + '-' + this.domains.length
|
||||||
// this.domainDir = this.safetyDomain
|
// this.domainDir = this.safetyDomain
|
||||||
this.certsRootPath = this.store.buildKey(this.email, 'certs')
|
this.certsRootPath = this.store.buildKey(this.email, 'certs')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue