@@ -126,7 +126,7 @@ def __init__(
126126 session : ClientSession | None = None ,
127127 verify_ssl : bool = True ,
128128 ssl_ca_cert : str | None = None ,
129- pinned_ca_cert_hash : str | None = None ,
129+ ssl_fingerprint : str | None = None ,
130130 use_password_obfuscation : bool | None = None ,
131131 ) -> None :
132132 """
@@ -141,7 +141,7 @@ def __init__(
141141 Set to False to disable verification for self-signed certificates.
142142 ssl_ca_cert: Path to custom CA certificate bundle file for SSL verification.
143143 Useful for self-signed certificates or private CAs.
144- pinned_ca_cert_hash : SHA-256 fingerprint of the server's TLS certificate
144+ ssl_fingerprint : SHA-256 fingerprint of the server's TLS certificate
145145 as a hex string. When set, the client will verify the server's
146146 certificate fingerprint instead of performing CA-based verification.
147147 Use `async_fetch_remote_fingerprint()` to retrieve this value.
@@ -158,7 +158,7 @@ def __init__(
158158 self ._ws : aiohttp .ClientWebSocketResponse | None = None
159159 self ._verify_ssl = verify_ssl
160160 self ._ssl_ca_cert = ssl_ca_cert
161- self ._pinned_ca_cert_hash = pinned_ca_cert_hash
161+ self ._ssl_fingerprint = ssl_fingerprint
162162 self ._use_password_obfuscation = use_password_obfuscation
163163 self ._ssl_config : ssl .SSLContext | Fingerprint | bool | None = None
164164
@@ -167,7 +167,7 @@ def _create_ssl_context(self) -> ssl.SSLContext | Fingerprint | bool:
167167 Create and configure SSL context based on initialization parameters.
168168
169169 Returns:
170- Fingerprint: Certificate fingerprint pinning (when pinned_ca_cert_hash set)
170+ Fingerprint: Certificate fingerprint pinning (when ssl_fingerprint set)
171171 ssl.SSLContext: Configured SSL context for custom certificates
172172 True: Use default SSL verification (aiohttp default)
173173 False: Disable SSL verification
@@ -177,9 +177,9 @@ def _create_ssl_context(self) -> ssl.SSLContext | Fingerprint | bool:
177177 ssl.SSLError: If the CA certificate is invalid.
178178 """
179179
180- if self ._pinned_ca_cert_hash :
180+ if self ._ssl_fingerprint :
181181 _LOGGER .debug ("Using certificate fingerprint pinning" )
182- return Fingerprint (bytes .fromhex (self ._pinned_ca_cert_hash ))
182+ return Fingerprint (bytes .fromhex (self ._ssl_fingerprint ))
183183
184184 if not self ._verify_ssl :
185185 _LOGGER .warning (
0 commit comments