Skip to content

openssl: toggling CURLSSLOPT_NO_PARTIALCHAIN makes a different CA cache - #20009

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/diff-ca-cache
Closed

openssl: toggling CURLSSLOPT_NO_PARTIALCHAIN makes a different CA cache#20009
bagder wants to merge 2 commits into
masterfrom
bagder/diff-ca-cache

Conversation

@bagder

@bagder bagder commented Dec 17, 2025

Copy link
Copy Markdown
Member

Reported-by: Stanislav Fort

@bagder bagder added the TLS label Dec 17, 2025
@bagder
bagder marked this pull request as ready for review December 17, 2025 12:52
@bagder
bagder requested a review from Copilot December 17, 2025 12:52
@bagder

bagder commented Dec 17, 2025

Copy link
Copy Markdown
Member Author

augment review

@augmentcode

augmentcode Bot commented Dec 17, 2025

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: OpenSSL: include CURLSSLOPT_NO_PARTIALCHAIN in the X509 store cache key so a CA store built with different partial-chain behavior is not reused.
Change: Persist and compare no_partialchain in ossl_x509_share when deciding whether a cached X509_STORE matches the current SSL config.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot 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.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

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

This PR fixes a bug where toggling the CURLSSLOPT_NO_PARTIALCHAIN option would incorrectly reuse a cached X509_STORE that was created with a different setting for this option. The no_partialchain flag controls whether OpenSSL's X509_V_FLAG_PARTIAL_CHAIN is set on the certificate store, which affects certificate chain validation behavior.

Key Changes:

  • Added no_partialchain field to ossl_x509_share structure to track the partial chain state of cached stores
  • Modified ossl_cached_x509_store_different() to check if the cached store's no_partialchain setting matches the current request
  • Updated ossl_set_cached_x509_store() to save the no_partialchain state when caching a store

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/vtls/openssl.c Outdated
@bagder bagder closed this in cd046f6 Dec 17, 2025
@bagder
bagder deleted the bagder/diff-ca-cache branch December 17, 2025 14:29
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