Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix code scanning alert no. 1: Use of insecure SSL/TLS version (#25)
Fixes [https://github.com/andreasgriffin/bitcoin-safe/security/code-scanning/1](https://github.com/andreasgriffin/bitcoin-safe/security/code-scanning/1) To fix the problem, we need to ensure that the SSL context explicitly disallows insecure TLS versions and only allows TLS 1.2 or higher. This can be done by setting the `minimum_version` attribute of the SSL context to `ssl.TLSVersion.TLSv1_2`. The best way to fix the problem without changing existing functionality is to modify the SSL context creation in the `get_electrum_server_version` function. Specifically, we will set the `minimum_version` attribute of the context to `ssl.TLSVersion.TLSv1_2` right after creating the context with `ssl.create_default_context()`. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
- Loading branch information