[lightapi/python]: fix peer connection failures on OpenSSL 3.5 environments by removing ABI-dependent SSL handling#2005
Open
ccHarvestasya wants to merge 9 commits intosymbol:devfrom
Conversation
… OpenSSL 3.5 / Python 3.10+ compatibility
…L certificate support test
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2005 +/- ##
==========================================
+ Coverage 96.87% 96.91% +0.04%
==========================================
Files 261 259 -2
Lines 19119 19152 +33
Branches 215 215
==========================================
+ Hits 18522 18562 +40
+ Misses 591 584 -7
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Background
This issue was discovered through failures in the shoestring health command.
Even when the node itself was healthy, the health command failed depending on which OpenSSL version Python was linked against.
In the reproduced environments:
Root Cause
The root cause was not OpenSSL 3.5 itself, but an ABI assumption in lightapi’s SSL/TLS handshake path.
The previous implementation extracted SSL_CTX from Python’s ssl.SSLContext using a fixed memory offset, then called SSL_CTX_set_verify.
This depended on Python object memory layout and linked OpenSSL ABI details, making it fragile across runtime combinations.
Changes
Impact
Security/Verification Note
Certificate verification strength should be reviewed carefully.
While compatibility improved, we should confirm the current TLS/app-layer verification policy is not weaker than intended.
Review Focus