Fix if that should have been an ifdef#129330
Conversation
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security |
There was a problem hiding this comment.
Pull request overview
This PR adjusts preprocessor guarding in the native crypto OpenSSL interop layer to avoid referencing an undefined FEATURE_DISTRO_AGNOSTIC_SSL macro during compilation (and also removes a stray whitespace-only line).
Changes:
- Replace
#if FEATURE_DISTRO_AGNOSTIC_SSLwith#ifdef FEATURE_DISTRO_AGNOSTIC_SSLin one OpenSSL 1.1 fallback gate. - Remove trailing whitespace in
CryptoNative_EvpPKeyEcHasExplicitEncoding.
Show a summary per file
| File | Description |
|---|---|
| src/native/libs/System.Security.Cryptography.Native/pal_ecc_import_export.c | Updates preprocessor usage around distro-agnostic OpenSSL feature gating to avoid undefined-macro build failures. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
|
@vcsjones-bot test 4043bd8 with OpenSSL_1_1_1w |
|
This is not the right fix because this won't be using system libssl on non-portable builds. We need to either move this line: runtime/src/native/libs/build-native.sh Line 58 in a0311b3 (also present in out of the the shell script's if block without touching the C sources, or change the condition to |
I am a bit confused by your assessment. We have a lot of other checks that use Every check is broken? |
|
See the diff https://godbolt.org/z/qh3hqsrP9.
|
This definition applies to cmake. The definition that applies to C that is relevant for this fix is here: runtime/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt Lines 100 to 104 in a0311b3 |
|
Ah, that makes sense. Maybe we should prefix it with |
Fixes #129329