Skip to content

openssl: avoid conn reuse if provider is used - #22665

Closed
bagder wants to merge 3 commits into
masterfrom
bagder/openssl-up-ref
Closed

bagder wants to merge 3 commits into
masterfrom
bagder/openssl-up-ref

Conversation

@bagder

@bagder bagder commented Aug 25, 2026

Copy link
Copy Markdown
Member

Reported-by: Stanislav Fort

@bagder bagder added the TLS label Aug 25, 2026
@bagder
bagder marked this pull request as ready for review August 25, 2026 09:21
@bagder

bagder commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Hm. They are somehow different context pointers...

@bagder
bagder marked this pull request as draft August 25, 2026 10:01
@bagder

bagder commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

This needs a different take...

@bagder bagder changed the title openssl: bump the ctx ref counter if the provider context is used openssl: avoid conn reuse if provider is used Aug 25, 2026
@bagder
bagder marked this pull request as ready for review August 25, 2026 13:59
@bagder
bagder requested a balanced review from Copilot August 25, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents OpenSSL provider-backed TLS connections from being reused.

Changes:

  • Marks provider-based connections for closure after use.
Suppressed comments (1)

lib/vtls/openssl.c:3762

  • connclose() only sets bits.close, which later HTTP/1.0 Connection: keep-alive handling clears via connkeep() (lib/http.c:3363, lib/connect.c:216-218). Such a provider-backed connection can therefore still be left reusable. Mark it permanently non-reusable as well so protocol keep-alive processing cannot undo this requirement.
    connclose(data->conn);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/vtls/openssl.c
@bagder bagder closed this in 7ea37ab Aug 25, 2026
@bagder
bagder deleted the bagder/openssl-up-ref branch August 25, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants