Show More
@@ -12,6 +12,8 b' import sys' | |||||
12 |
|
12 | |||
13 | from mercurial import ( |
|
13 | from mercurial import ( | |
14 | cmdutil, |
|
14 | cmdutil, | |
|
15 | sslutil, | |||
|
16 | ui as uimod, | |||
15 | ) |
|
17 | ) | |
16 |
|
18 | |||
17 | def log(msg): |
|
19 | def log(msg): | |
@@ -35,11 +37,10 b' class dummysmtpsecureserver(dummysmtpser' | |||||
35 | if not pair: |
|
37 | if not pair: | |
36 | return |
|
38 | return | |
37 | conn, addr = pair |
|
39 | conn, addr = pair | |
|
40 | ui = uimod.ui() | |||
38 | try: |
|
41 | try: | |
39 | # wrap_socket() would block, but we don't care |
|
42 | # wrap_socket() would block, but we don't care | |
40 |
conn = ssl.wrap |
|
43 | conn = sslutil.wrapserversocket(conn, ui, certfile=self._certfile) | |
41 | certfile=self._certfile, |
|
|||
42 | ssl_version=ssl.PROTOCOL_TLSv1) |
|
|||
43 | except ssl.SSLError: |
|
44 | except ssl.SSLError: | |
44 | log('%s ssl error\n' % addr[0]) |
|
45 | log('%s ssl error\n' % addr[0]) | |
45 | conn.close() |
|
46 | conn.close() |
General Comments 0
You need to be logged in to leave comments.
Login now