Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tls: add custom_ssl_context parameter #1

Merged
merged 5 commits into from
Oct 25, 2024
Merged

Tls: add custom_ssl_context parameter #1

merged 5 commits into from
Oct 25, 2024

Conversation

bgre
Copy link
Owner

@bgre bgre commented Oct 25, 2024

Add a custom_ssl_context parameter to Tls() that makes it possible to pass a custom ssl.SSLContext object for the TLS connection, allowing configurations not supported in the current code, such as more recent options like ssl.SSLContext.verify_flags.

One use case is to enable partial certificate chain verification for pinning certificates in situations where a root certificate is not available.

@bgre bgre merged commit c9675da into custom-ssl-context Oct 25, 2024
@bgre bgre deleted the patch-1 branch October 25, 2024 20:50
bgre added a commit that referenced this pull request Nov 7, 2024
Add a custom_ssl_context parameter to `Tls()` that makes it possible to pass a custom `ssl.SSLContext` object for the TLS connection, allowing configurations not supported in the current code, such as more recent options like [ssl.SSLContext.verify_flags](https://docs.python.org/3.11/library/ssl.html#ssl.SSLContext.verify_flags).

One use case is to enable [partial certificate chain verification](https://docs.python.org/3.11/library/ssl.html#ssl.VERIFY_X509_PARTIAL_CHAIN) for pinning certificates in situations where a root certificate is not available.
bgre added a commit that referenced this pull request Nov 7, 2024
* Tls: add custom_ssl_context parameter (#1)

Add a custom_ssl_context parameter to `Tls()` that makes it possible to pass a custom `ssl.SSLContext` object for the TLS connection, allowing configurations not supported in the current code, such as more recent options like [ssl.SSLContext.verify_flags](https://docs.python.org/3.11/library/ssl.html#ssl.SSLContext.verify_flags).

One use case is to enable [partial certificate chain verification](https://docs.python.org/3.11/library/ssl.html#ssl.VERIFY_X509_PARTIAL_CHAIN) for pinning certificates in situations where a root certificate is not available.

* Fix syntax error
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.

1 participant