Skip to content

Conversation

nhorman
Copy link
Contributor

@nhorman nhorman commented Aug 1, 2025

When using SYSTEM_LIBCRYPTO, the cmake build system attempts to link libssl statically and libcrypto dynamically. This leads to missing symbols as openssl expects either both libraries to be linked statically or dynamically, not one or the other

Fixes #5210

Description

#5210 reported an issue in which, when using the cmake build infrastructure directly, missing symbols were found when loaded (most notably ossl_time_now). This occured because libssl is being linked statically (which references ossl_time_now in the static archive), but ossl_time_now is only defined as an internal symbol in the libcrypto.dso.

Testing

Unsure, I think most of the tests use the powershell build scripts to build (which link libssl and libcrypto statically avoiding the problem). presumably we would want to test cmake directly, but I'm not sure if thats worthwhile

Documentation

No

When using SYSTEM_LIBCRYPTO, the cmake build system attempts to link
libssl statically and libcrypto dynamically.  This leads to missing
symbols as openssl expects either both libraries to be linked statically
or dynamically, not one or the other

Fixes microsoft#5210
@nhorman nhorman requested a review from a team as a code owner August 1, 2025 12:55
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.24%. Comparing base (2861d81) to head (58b7cb6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5312      +/-   ##
==========================================
+ Coverage   85.35%   86.24%   +0.88%     
==========================================
  Files          59       59              
  Lines       18331    18331              
==========================================
+ Hits        15647    15809     +162     
+ Misses       2684     2522     -162     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenSSL 3.5 crash
1 participant