# HG changeset patch # User Yuya Nishihara # Date 2015-03-04 13:41:48 # Node ID 07fafcd4bc74b42e7b8bbba2f8538de487b3f7f2 # Parent 922e087ba158cead5ca55a9c3260c4777e963296 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. diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -320,6 +320,11 @@ def has_ssl(): 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' diff --git a/tests/test-https.t b/tests/test-https.t --- a/tests/test-https.t +++ b/tests/test-https.t @@ -119,7 +119,7 @@ OS X has a dummy CA cert that enables us 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]