mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
## Summary Fixes `TLSSocket.isSessionReused()` to use BoringSSL's `SSL_session_reused()` API instead of incorrectly checking if a session was set. The previous implementation returned `!!this[ksession]` which would return `true` if `setSession()` was called, even if the session wasn't actually reused by the SSL layer. This fix correctly uses the native SSL API like Node.js does. ## Changes - Added native `isSessionReused` function in Zig that calls `SSL_session_reused()` - Updated `TLSSocket.prototype.isSessionReused` to use the native implementation - Added regression tests ## Test plan - [x] `bun bd test test/regression/issue/25190.test.ts` passes - [x] `bun bd test test/js/node/tls/node-tls-connect.test.ts` passes Fixes #25190 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com>
3.8 KiB
3.8 KiB