new notification system

This commit is contained in:
KingKDot
2026-03-22 00:36:02 -05:00
parent b98613ae51
commit 92530044c9
15 changed files with 580 additions and 5 deletions
@@ -1,5 +1,6 @@
import { certificatesExist, generateSelfSignedCert, getLocalIPs, isOpenSSLAvailable } from "../certGenerator";
import { logger } from "../logger";
import { X509Certificate } from "crypto";
import path from "path";
type TlsBootstrapParams = {
@@ -119,6 +120,15 @@ export async function prepareTlsOptions(params: TlsBootstrapParams): Promise<Tls
}
}
if (source === "configured" && tlsOptions.cert) {
try {
const x509 = new X509Certificate(tlsOptions.cert);
if (x509.issuer === x509.subject) {
source = "self-signed";
}
} catch { }
}
return {
tlsOptions,
certPathUsed: params.certPath,