test-https: enable dummycert test only if Apple python is used (
issue4500)
The dummycert trick works only if Python is linked to Apple's patched OpenSSL.
--- a/tests/hghave.py Wed Mar 04 22:27:01 2015 +0900
+++ b/tests/hghave.py Wed Mar 04 22:41:48 2015 +0900
@@ -320,6 +320,11 @@
except ImportError:
return False
+@check("defaultcacerts", "can verify SSL certs by system's CA certs store")
+def has_defaultcacerts():
+ from mercurial import sslutil
+ return sslutil._defaultcacerts()
+
@check("windows", "Windows")
def has_windows():
return os.name == 'nt'
--- a/tests/test-https.t Wed Mar 04 22:27:01 2015 +0900
+++ b/tests/test-https.t Wed Mar 04 22:41:48 2015 +0900
@@ -119,7 +119,7 @@
Apple's OpenSSL. This trick do not work with plain OpenSSL.
$ DISABLEOSXDUMMYCERT=
-#if osx
+#if defaultcacerts
$ hg clone https://localhost:$HGPORT/ copy-pull
abort: error: *certificate verify failed* (glob)
[255]