mirror of https://github.com/certd/certd
fix: 修复中间证书复制错误的bug
parent
a00e96b63b
commit
76e86ea283
|
@ -117,7 +117,7 @@ export class CopyCertToLocalPlugin extends AbstractTaskPlugin {
|
||||||
let { crtPath, keyPath, icPath, pfxPath, derPath } = this;
|
let { crtPath, keyPath, icPath, pfxPath, derPath } = this;
|
||||||
const certReader = new CertReader(this.cert);
|
const certReader = new CertReader(this.cert);
|
||||||
|
|
||||||
const handle = async ({ reader, tmpCrtPath, tmpKeyPath, tmpDerPath, tmpPfxPath }) => {
|
const handle = async ({ reader, tmpCrtPath, tmpKeyPath, tmpDerPath, tmpPfxPath, tmpIcPath }) => {
|
||||||
this.logger.info('复制到目标路径');
|
this.logger.info('复制到目标路径');
|
||||||
if (crtPath) {
|
if (crtPath) {
|
||||||
crtPath = crtPath.startsWith('/') ? crtPath : path.join(Constants.dataDir, crtPath);
|
crtPath = crtPath.startsWith('/') ? crtPath : path.join(Constants.dataDir, crtPath);
|
||||||
|
@ -131,7 +131,7 @@ export class CopyCertToLocalPlugin extends AbstractTaskPlugin {
|
||||||
}
|
}
|
||||||
if (icPath) {
|
if (icPath) {
|
||||||
icPath = icPath.startsWith('/') ? icPath : path.join(Constants.dataDir, icPath);
|
icPath = icPath.startsWith('/') ? icPath : path.join(Constants.dataDir, icPath);
|
||||||
this.copyFile(tmpPfxPath, icPath);
|
this.copyFile(tmpIcPath, icPath);
|
||||||
this.hostIcPath = icPath;
|
this.hostIcPath = icPath;
|
||||||
}
|
}
|
||||||
if (pfxPath) {
|
if (pfxPath) {
|
||||||
|
|
Loading…
Reference in New Issue