Skip to content

Commit 553dc9b

Browse files
committed
fix: ensure certPath & certKeyPath are properly defined
1 parent ec87e68 commit 553dc9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/certificate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ export async function addCertToSystemTrustStoreAndSaveCert(cert: Cert, caCert: s
257257

258258
export function storeCertificate(cert: Cert, options?: TlsOption): CertPath {
259259
debugLog('storage', `Storing certificate and private key with options: ${JSON.stringify(options)}`, options?.verbose)
260-
const certPath = options?.basePath ? path.join(options.basePath, options?.certPath || config.certPath) : config.certPath
261-
const certKeyPath = options?.basePath ? path.join(options.basePath, options?.keyPath || config.keyPath) : config.keyPath
260+
const certPath = path.join(options?.basePath || config.basePath, options?.certPath || config.certPath)
261+
const certKeyPath = path.join(options?.basePath || config.basePath, options?.keyPath || config.keyPath)
262262

263263
debugLog('storage', `Certificate path: ${certPath}`, options?.verbose)
264264
debugLog('storage', `Private key path: ${certKeyPath}`, options?.verbose)

0 commit comments

Comments
 (0)