# HG changeset patch # User Yuya Nishihara # Date 1425476508 -32400 # 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 -r 922e087ba158 -r 07fafcd4bc74 tests/hghave.py --- 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' diff -r 922e087ba158 -r 07fafcd4bc74 tests/test-https.t --- 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]