summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2021-11-22 22:59:48 +0100
committerMatěj Cepl <mcepl@cepl.eu>2023-02-03 17:02:04 +0100
commitfd916f04299e0ed72edea960b56b371cee2a1459 (patch)
tree4526593c337c1ec78d56f21b96ace783e97e6a9d
parent6c61ea3bb52d22951467e627406dd06bbf42dfec (diff)
downloadm2crypto-fix_types.tar.gz
-rw-r--r--src/M2Crypto/BIO.py5
-rw-r--r--src/M2Crypto/SSL/Connection.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/M2Crypto/BIO.py b/src/M2Crypto/BIO.py
index 090064b..74a7b78 100644
--- a/src/M2Crypto/BIO.py
+++ b/src/M2Crypto/BIO.py
@@ -370,7 +370,10 @@ class SSLBio(BIO):
self.closed = 0
def set_ssl(self, conn, close_flag=m2.bio_noclose):
- ## type: (Connection, int) -> None
+ # type: (Any, int) -> None
+ # conn should actually be SSL.Connection, but we cannot import
+ # it here without getting into some serious circular dependency
+ # business.
"""
Sets the bio to the SSL pointer which is
contained in the connection object.
diff --git a/src/M2Crypto/SSL/Connection.py b/src/M2Crypto/SSL/Connection.py
index c5693c9..62a661e 100644
--- a/src/M2Crypto/SSL/Connection.py
+++ b/src/M2Crypto/SSL/Connection.py
@@ -101,10 +101,10 @@ class Connection(object):
self._free_bio()
def close(self, freeBio=False):
+ # type: (Optional[bool]) -> None
"""
if freeBio is true, call _free_bio
"""
- # type: () -> None
m2.ssl_shutdown(self.ssl)
if freeBio:
self._free_bio()