*Update SSL types

This commit is contained in:
Derrick Hammer 2023-04-18 22:54:35 -04:00
parent 3ae45da896
commit 3231c18e08
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 15 additions and 8 deletions

View File

@ -1,18 +1,25 @@
import type tls from "tls";
export type SSLManagerRenewHandler = (domain: string) => Promise<boolean>;
export type SSLCert = string | Buffer | Array<string | Buffer>;
declare class SSLManager {
private _context?;
private _key?;
private _cert?;
private _domain;
private _renewHandler?;
constructor(domain: string);
get context(): tls.SecureContext;
set privateKey(key: Buffer);
set cert(cert: Buffer);
private _maybeUpdateContext;
set cert(cert: SSLCert);
renew(): Promise<boolean>;
get enabled(): any;
get enabled(): boolean;
get ready(): boolean;
get renewHandler(): SSLManagerRenewHandler;
set renewHandler(value: SSLManagerRenewHandler);
}
export default SSLManager;