--- a/tests/hghave.py Tue Jan 13 14:15:08 2015 -0500
+++ b/tests/hghave.py Tue Jan 13 15:08:55 2015 -0500
@@ -307,11 +307,13 @@
return not matchoutput('hg root 2>&1',
r'abort: no repository found', True)
-@check("ssl", "python >= 2.6 ssl module and python OpenSSL")
+@check("ssl", ("(python >= 2.6 ssl module and python OpenSSL) "
+ "OR python >= 2.7.9 ssl"))
def has_ssl():
try:
import ssl
- ssl.wrap_socket # silence unused import warning
+ if getattr(ssl, 'create_default_context', False):
+ return True
import OpenSSL
OpenSSL.SSL.Context
return True