Skip to content

Commit

Permalink
fix: safer ssl context access
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 23, 2021
1 parent cc3d673 commit 7b887ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/netius/base/transport.py
Expand Up @@ -176,7 +176,7 @@ def set_extra_dict(self):
compression = lambda: self._connection.socket.compression(),
cipher = lambda: self._connection.socket.cipher(),
peercert = lambda: self._connection.socket.getpeercert(),
sslcontext = lambda: self._connection.socket.context,
sslcontext = lambda: self._connection.socket.context if hasattr(self._connection.socket, "context") else None,
ssl_object = lambda: self._connection.socket
)

Expand Down

0 comments on commit 7b887ad

Please sign in to comment.