Skip to content

Remove unused CFFI bindings without specific consumer#14798

Merged
reaperhulk merged 2 commits into
pyca:mainfrom
alex:remove-unused-cffi-bindings
Jun 6, 2026
Merged

Remove unused CFFI bindings without specific consumer#14798
reaperhulk merged 2 commits into
pyca:mainfrom
alex:remove-unused-cffi-bindings

Conversation

@alex
Copy link
Copy Markdown
Member

@alex alex commented May 4, 2026

Drops bindings whose git history shows no specific user/consumer request — they were added in bulk during the cffi 1.0 conversion or as generic library setup, and are no longer referenced by cryptography itself. Bindings that were explicitly requested by external consumers (pyOpenSSL, mitmproxy, Tribler, etc.) are retained.

Also removes the now-unused USE_CONST_X509 env var plumbing in build.rs, since the X509V3_CTX struct that depended on it is gone.

@alex alex force-pushed the remove-unused-cffi-bindings branch from f82d82f to 5006e58 Compare May 5, 2026 11:23
@alex alex force-pushed the remove-unused-cffi-bindings branch 2 times, most recently from 833387f to da53512 Compare May 12, 2026 01:31
alex and others added 2 commits June 6, 2026 14:15
Drops bindings whose git history shows no specific user/consumer
request — they were added in bulk during the cffi 1.0 conversion or as
generic library setup, and are no longer referenced by cryptography
itself. Bindings that were explicitly requested by external consumers
(pyOpenSSL, mitmproxy, Tribler, etc.) are retained.

Also removes the now-unused USE_CONST_X509 env var plumbing in
build.rs, since the X509V3_CTX struct that depended on it is gone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mitmproxy's tlsconfig addon calls X509_VERIFY_PARAM_set1_host,
X509_VERIFY_PARAM_set_hostflags, and X509_VERIFY_PARAM_set1_ip via
SSL._lib, so these have an external consumer and must stay.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alex alex force-pushed the remove-unused-cffi-bindings branch from da53512 to 618775a Compare June 6, 2026 21:18
@alex
Copy link
Copy Markdown
Member Author

alex commented Jun 6, 2026

@mhils there's a few cffi things that mitmproxy is poking around for -- can we add proper pyopenssl APIs for those so mitmproxy isn't reliant on implementation details that will break

@reaperhulk reaperhulk merged commit c02e6ed into pyca:main Jun 6, 2026
64 checks passed
@alex alex deleted the remove-unused-cffi-bindings branch June 6, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants