Require apex and www TLS for storefront SSL status.
Per-row ensure and SSL refresh treat storefront as valid only when both names match, and toast messages list each host explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
a9d5f2e48d
commit
158523df7b
@@ -1,14 +1,15 @@
|
||||
import * as tls from 'tls';
|
||||
|
||||
const DEFAULT_TIMEOUT_MS = 2500;
|
||||
const DEFAULT_TIMEOUT_MS = 4000;
|
||||
|
||||
function peerMatchesHost(host: string, socket: tls.TLSSocket): boolean {
|
||||
const cert = socket.getPeerCertificate();
|
||||
// detailed=true so SAN is present for checkServerIdentity
|
||||
const cert = socket.getPeerCertificate(true);
|
||||
if (!cert || Object.keys(cert).length === 0) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
const err = tls.checkServerIdentity(host, cert);
|
||||
const err = tls.checkServerIdentity(host, cert as tls.PeerCertificate);
|
||||
return !err;
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user