mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 19:09:32 +00:00
Code styling tweaks to core utils & YAML loader (#85433)
Code styling tweaks to core utils
This commit is contained in:
@@ -8,12 +8,12 @@ import certifi
|
||||
def client_context() -> ssl.SSLContext:
|
||||
"""Return an SSL context for making requests."""
|
||||
|
||||
# Reuse environment variable definition from requests, since it's already a requirement
|
||||
# If the environment variable has no value, fall back to using certs from certifi package
|
||||
# Reuse environment variable definition from requests, since it's already a
|
||||
# requirement. If the environment variable has no value, fall back to using
|
||||
# certs from certifi package.
|
||||
cafile = environ.get("REQUESTS_CA_BUNDLE", certifi.where())
|
||||
|
||||
context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=cafile)
|
||||
return context
|
||||
return ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=cafile)
|
||||
|
||||
|
||||
def server_context_modern() -> ssl.SSLContext:
|
||||
|
||||
Reference in New Issue
Block a user