Skip to content

Commit

Permalink
feat: Support Private CA for server certificates.
Browse files Browse the repository at this point in the history
  • Loading branch information
hessjcg committed Dec 17, 2024
1 parent 20a12da commit b378f2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export function validateCertificate(
dnsName: string
) {
return (hostname: string, cert: tls.PeerCertificate): Error | undefined => {
if (serverCaMode === 'GOOGLE_MANAGED_CAS_CA') {
if (serverCaMode === 'GOOGLE_MANAGED_CAS_CA'

Check failure on line 39 in src/socket.ts

View workflow job for this annotation

GitHub Actions / Lint

Replace `serverCaMode·===·'GOOGLE_MANAGED_CAS_CA'⏎······||·serverCaMode·===·'CUSTOMER_MANAGED_CAS_CA'` with `⏎······serverCaMode·===·'GOOGLE_MANAGED_CAS_CA'·||⏎······serverCaMode·===·'CUSTOMER_MANAGED_CAS_CA'⏎····`
|| serverCaMode === 'CUSTOMER_MANAGED_CAS_CA') {
return tls.checkServerIdentity(dnsName, cert);
}
if (!cert || !cert.subject) {
Expand Down

0 comments on commit b378f2e

Please sign in to comment.