aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
Diffstat (limited to 'netlib')
-rw-r--r--netlib/certutils.py14
-rw-r--r--netlib/tcp.py5
2 files changed, 3 insertions, 16 deletions
diff --git a/netlib/certutils.py b/netlib/certutils.py
index 22b5c35c..d9b8ce57 100644
--- a/netlib/certutils.py
+++ b/netlib/certutils.py
@@ -116,18 +116,6 @@ class CertStore:
def __init__(self):
self.certs = {}
- def check_domain(self, commonname):
- try:
- commonname.decode("idna")
- commonname.decode("ascii")
- except:
- return False
- if ".." in commonname:
- return False
- if "/" in commonname:
- return False
- return True
-
def get_cert(self, commonname, sans, cacert):
"""
Returns an SSLCert object.
@@ -141,8 +129,6 @@ class CertStore:
Return None if the certificate could not be found or generated.
"""
- if not self.check_domain(commonname):
- return None
if commonname in self.certs:
return self.certs[commonname]
c = dummy_cert(cacert, commonname, sans)
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 8fe04d2e..b3be43d6 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -346,8 +346,9 @@ class BaseHandler:
self.connection.sock_shutdown(socket.SHUT_WR)
else:
self.connection.shutdown(socket.SHUT_WR)
- #Section 4.2.2.13 of RFC 1122 tells us that a close() with any pending readable data could lead to an immediate RST being sent.
- #http://ia600609.us.archive.org/22/items/TheUltimateSo_lingerPageOrWhyIsMyTcpNotReliable/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable.html
+ # Section 4.2.2.13 of RFC 1122 tells us that a close() with any
+ # pending readable data could lead to an immediate RST being sent.
+ # http://ia600609.us.archive.org/22/items/TheUltimateSo_lingerPageOrWhyIsMyTcpNotReliable/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable.html
while self.connection.recv(4096):
pass
except (socket.error, SSL.Error):