Skip to content

Conversation

@Tasssadar
Copy link

@Tasssadar Tasssadar commented Oct 13, 2025

This should be the official, supported way of passing SSL context to Requests. Let's document and test it, so it does not break in the future.

It would be also fairly easy to modify HTTPAdapter to actually take ssl context natively and make this easier for users - I can prepare a PR, but from the general vibe of the project, it seemed to me that expanding the feature set like this is not that desired, so just a test and docs for now.

Fixes #7040

Comment on lines +1054 to +1056
def cert_verify(self, *_args, **_kwargs) -> None:
# Override HTTPAdapter cert_verify method, it tries to load certs from disk otherwise
pass
Copy link
Author

@Tasssadar Tasssadar Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This override was not necessary between (likely, not tested) 2.32.0 and 2.32.5, see #7040 , because the SSL context caching worked out that way.

Is it intended that it is required now?

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.

2.32.5 breaks passing custom SSL context

1 participant