mirror of
https://github.com/certd/certd.git
synced 2026-04-28 07:57:25 +08:00
refactor: dir with md5
This commit is contained in:
@@ -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 + '-' + this.domains.length
|
this.domainDir = this.safetyDomain + '-' + md5(this.getDomainStr(this.domains))
|
||||||
// this.domainDir = this.safetyDomain
|
// this.domainDir = this.safetyDomain
|
||||||
this.certsRootPath = this.store.buildKey(this.email, 'certs')
|
this.certsRootPath = this.store.buildKey(this.email, 'certs')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user