Skip to content

openssl: fix compiler warning with OpenSSL master#20681

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/openssl-const
Closed

openssl: fix compiler warning with OpenSSL master#20681
bagder wants to merge 1 commit intomasterfrom
bagder/openssl-const

Conversation

@bagder
Copy link
Member

@bagder bagder commented Feb 23, 2026

vtls/openssl.c:469:15: error: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

X509_get_X509_PUBKEY() now returns a const pointer.

@bagder bagder added the TLS label Feb 23, 2026
@bagder bagder requested a review from Copilot February 23, 2026 08:18
@bagder bagder marked this pull request as ready for review February 23, 2026 08:18
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a build warning when compiling curl’s OpenSSL TLS backend against OpenSSL master, where X509_get_X509_PUBKEY() now returns a const pointer.

Changes:

  • Adjusts the xpubkey local variable’s type in ossl_certchain() to match OpenSSL’s updated const return type (guarded by HAVE_OPENSSL3).

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

vtls/openssl.c:469:15: error: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]

X509_get_X509_PUBKEY() now returns a const pointer - but only on OpenSSL
3, we must keep the non-const version for all forks.

Closes #20681
@bagder bagder force-pushed the bagder/openssl-const branch from b331b80 to d9f5b3c Compare February 23, 2026 08:24
@testclutch
Copy link

Analysis of PR #20681 at d9f5b3c5:

Test ../../tests/http/test_07_upload.py::TestUpload::test_07_32_issue_10591[h3] failed, which has NOT been flaky recently, so there could be a real issue in this PR. Note that this test has failed in 2 different CI jobs (the link just goes to one of them).

Generated by Testclutch

@bagder bagder closed this in 3877db7 Feb 23, 2026
@bagder bagder deleted the bagder/openssl-const branch February 23, 2026 09:24
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.

3 participants