-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Fix build compilation with OpenSSL 4.0-dev. #122744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
OpenSSL marked a few methods that could return const as requiring const. Add const qualifiers where needed.
There was a problem hiding this comment.
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 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 |
|
Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones |
|
/ba-g deadletter on unaffected platform. |
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.