projects
/
certmaster.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(Not working yet, but the changeset was getting too big: The service starts, but...
[certmaster.git]
/
certmaster
/
SSLConnection.py
diff --git
a/certmaster/SSLConnection.py
b/certmaster/SSLConnection.py
index
98ed8a0
..
3e72d5e
100644
(file)
--- a/
certmaster/SSLConnection.py
+++ b/
certmaster/SSLConnection.py
@@
-8,7
+8,7
@@
from OpenSSL import SSL
import time, socket, select
from OpenSSL import SSL
import time, socket, select
-from
func.
CommonErrors import canIgnoreSSLError
+from CommonErrors import canIgnoreSSLError
class SSLConnection:
class SSLConnection:
@@
-62,7
+62,7
@@
class SSLConnection:
c, a = self.__dict__["conn"].accept()
return (SSLConnection(c), a)
c, a = self.__dict__["conn"].accept()
return (SSLConnection(c), a)
- def makefile(self, mode
, bufsize
):
+ def makefile(self, mode
='r', bufsize=-1
):
"""
We need to use socket._fileobject Because SSL.Connection
doesn't have a 'dup'. Not exactly sure WHY this is, but
"""
We need to use socket._fileobject Because SSL.Connection
doesn't have a 'dup'. Not exactly sure WHY this is, but
@@
-97,6
+97,9
@@
class SSLConnection:
if not con in write:
raise socket.timeout((110, "Operation timed out."))
if not con in write:
raise socket.timeout((110, "Operation timed out."))
+ if hasattr(data, 'tobytes'):
+ data = data.tobytes()
+
starttime = time.time()
origlen = len(data)
sent = -1
starttime = time.time()
origlen = len(data)
sent = -1