tls/openssl: build with the constified X509 name accessors in OpenSSL 4 - #3647
Open
heitbaum wants to merge 3 commits into
Open
tls/openssl: build with the constified X509 name accessors in OpenSSL 4#3647heitbaum wants to merge 3 commits into
heitbaum wants to merge 3 commits into
Conversation
OpenSSL 4.0 changed X509_get_subject_name() and X509_get_issuer_name() to
return a const X509_NAME *, so assigning the result to a plain
X509_NAME * fails the -Wignored-qualifiers -Werror build:
openssl-x509.c:140:20: error: assignment discards 'const' qualifier
from pointer target type [-Werror=discarded-qualifiers]
Make the read-only users const, and cast at the two sites that fill in
the subject name of a cert that has not been signed yet. All of this
also compiles against OpenSSL 3, where the accessors return non-const.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
|
lws-team
force-pushed
the
main
branch
6 times, most recently
from
July 27, 2026 20:02
558a432 to
4e59faf
Compare
lws-team
force-pushed
the
main
branch
2 times, most recently
from
August 5, 2026 14:27
feb2be6 to
b1c687c
Compare
lws-team
force-pushed
the
main
branch
10 times, most recently
from
August 31, 2026 10:48
591ce34 to
bc69b6b
Compare
lws-team
force-pushed
the
main
branch
2 times, most recently
from
September 6, 2026 04:02
106d542 to
d7e586c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




With libwebsockets-5.0.0
OpenSSL 4.0 changed X509_get_subject_name() and X509_get_issuer_name() to return a const X509_NAME *, so assigning the result to a plain X509_NAME * fails the -Wignored-qualifiers -Werror build:
Make the read-only users const, and cast at the two sites that fill in the subject name of a cert that has not been signed yet. All of this also compiles against OpenSSL 3, where the accessors return non-const.