From 356681af35db4064cf02e66b9b52b00f4a3f066f Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 18 Apr 2023 22:35:28 -0400 Subject: [PATCH] *Update cert types --- src/modules/ssl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/ssl.ts b/src/modules/ssl.ts index 79a0d02..1438640 100644 --- a/src/modules/ssl.ts +++ b/src/modules/ssl.ts @@ -4,6 +4,7 @@ import log from "../log.js"; import config from "../config.js"; export type SSLManagerRenewHandler = (domain: string) => Promise; +type SSLCert = string | Buffer | Array; export class SSLManager { private _key?: Buffer; @@ -19,9 +20,9 @@ export class SSLManager { return this._context as tls.SecureContext; } - private _cert?: Buffer; + private _cert?: SSLCert; - set cert(cert: Buffer) { + set cert(cert: SSLCert) { this._cert = cert; this._maybeUpdateContext(); }