Skip to content

Conversation

@vcsjones
Copy link
Member

@vcsjones vcsjones commented Dec 26, 2025

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.

OpenSSL marked a few methods that could return const as requiring const. Add const qualifiers where needed.
Copilot AI review requested due to automatic review settings December 26, 2025 17:16
Copy link
Contributor

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

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_GetX509PublicKeyBytes return type to return const 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

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@vcsjones
Copy link
Member Author

/ba-g deadletter on unaffected platform.

@vcsjones vcsjones merged commit 6fa71d3 into dotnet:main Jan 12, 2026
99 of 101 checks passed
@vcsjones vcsjones deleted the openssl-dev-const branch January 12, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build Failure for run 20505620371

2 participants