Repository navigation
Fix build compilation with OpenSSL 4.0-dev. - #122744
Merged
Merged
Conversation
OpenSSL marked a few methods that could return const as requiring const. Add const qualifiers where needed.
vcsjones
commented
Dec 26, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the System.Security.Cryptography.Native bindings to be compatible with OpenSSL 4.0-dev by adding const qualifiers to function signatures and local variables where OpenSSL now requires them.
Key Changes:
- Updated
CryptoNative_GetX509PublicKeyBytesreturn type to returnconst ASN1_BIT_STRING* - Added const qualifiers to local
X509_PUBKEY*variables in two functions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/native/libs/System.Security.Cryptography.Native/openssl.h | Updated function signature for CryptoNative_GetX509PublicKeyBytes to return const pointer |
| src/native/libs/System.Security.Cryptography.Native/openssl.c | Added const qualifiers to function implementation and local variables to match OpenSSL 4.0-dev API requirements |
vcsjones
commented
Dec 26, 2025
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
This was referenced Dec 26, 2025
bartonjs
approved these changes
Jan 12, 2026
Member
Author
|
/ba-g deadletter on unaffected platform. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
OpenSSL marked a few methods that could return const as requiring const. Add const qualifiers where needed.
If we fix this now, we can keep scouting against openssl's main branch.
Fixes vcsjones/runtime-ci#9.