mirror of
https://github.com/oven-sh/bun
synced 2026-02-22 16:51:50 +00:00
When `getPeerCertificate(true)` returns undefined (e.g. due to SSL handle or cert chain being unavailable), `checkServerIdentity` would be called with `undefined` as the cert argument, causing a TypeError: "Cannot destructure property 'subject' from null or undefined value". Add a null check on the cert before passing it to `checkServerIdentity` in both TLS handshake handlers in net.ts. Closes #23556 Co-Authored-By: Claude <noreply@anthropic.com>