What does this certificate-name check print?
import { checkServerIdentity } from "node:tls";
const cert = {
subjectaltname: "DNS:api.internal, DNS:*.svc.internal",
};
for (const host of ["api.internal", "orders.svc.internal", "bad.internal"]) {
const error = checkServerIdentity(host, cert);
console.log(`${host}: ${error?.code ?? "ok"}`);
}
-
-
-