Skip to content

Commit 2e280d4

Browse files
author
Robert Hegner
committed
Allow providing custom ssl context
1 parent a483eac commit 2e280d4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sagemcom_api/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import json
99
import math
1010
import random
11+
from ssl import SSLContext
1112
from types import TracebackType
1213
from typing import Any
1314
import urllib.parse
@@ -78,6 +79,7 @@ def __init__(
7879
session: ClientSession | None = None,
7980
ssl: bool | None = False,
8081
verify_ssl: bool | None = True,
82+
ssl_context: SSLContext | None = None
8183
):
8284
"""
8385
Create a SagemCom client.
@@ -107,7 +109,8 @@ def __init__(
107109
headers={"User-Agent": f"{DEFAULT_USER_AGENT}"},
108110
timeout=ClientTimeout(DEFAULT_TIMEOUT),
109111
connector=TCPConnector(
110-
verify_ssl=verify_ssl if verify_ssl is not None else True
112+
verify_ssl=verify_ssl,
113+
ssl_context=ssl_context
111114
),
112115
)
113116
)

0 commit comments

Comments
 (0)