Add SSL Verification Options and Improved Certificate Handling (#817)

* Add SSL verification configuration option

- Add `verify_ssl` parameter to DownloadsConfig to control SSL certificate verification
- Update client methods to use the new SSL verification setting
- Add CLI option `--no-ssl-verify` to disable SSL verification
- Implement SSL verification support across various clients and network requests
- Add test suite to validate SSL verification configuration

* Enhance SSL certificate handling with certifi support

- Add new `ssl_utils.py` module for SSL certificate management
- Implement optional certifi package support for improved certificate verification
- Add utility functions for creating SSL contexts and handling connector kwargs
- Update various clients to use new SSL utility functions
- Add helpful error messaging for SSL certificate verification issues
- Include optional certifi dependency in pyproject.toml

* Enhance SSL verification tests and configuration support

- Add comprehensive test suite for SSL verification utilities
- Implement tests for SSL context creation and configuration
- Update test configuration to include verify_ssl option
- Add test coverage for SSL verification across different clients and methods
- Improve error handling and testing for SSL-related configurations

* run ruff format

* Fix ruff checks

---------

Co-authored-by: Nathan Thomas <nathanthomas707@gmail.com>
This commit is contained in:
Kyrre Gjerstad 2025-03-10 16:41:06 +01:00 committed by GitHub
parent fe169fe2e6
commit dc7ca02529
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 596 additions and 75 deletions

View file

@ -163,6 +163,7 @@ def test_sample_config_data_fields(sample_config_data):
concurrency=True,
max_connections=6,
requests_per_minute=60,
verify_ssl=True,
),
qobuz=QobuzConfig(
use_auth_token=False,