comparison mercurial/sslutil.py @ 37123:a8a902d7176e

procutil: bulk-replace function calls to point to new module
author Yuya Nishihara <yuya@tcha.org>
date Sat, 24 Mar 2018 15:10:51 +0900
parents f0b6fbea00cf
children 46e705b79323
comparison
equal deleted inserted replaced
37122:d4a2e0d5d042 37123:a8a902d7176e
20 node, 20 node,
21 pycompat, 21 pycompat,
22 util, 22 util,
23 ) 23 )
24 from .utils import ( 24 from .utils import (
25 procutil,
25 stringutil, 26 stringutil,
26 ) 27 )
27 28
28 # Python 2.7.9+ overhauled the built-in SSL/TLS features of Python. It added 29 # Python 2.7.9+ overhauled the built-in SSL/TLS features of Python. It added
29 # support for TLS 1.1, TLS 1.2, SNI, system CA stores, etc. These features are 30 # support for TLS 1.1, TLS 1.2, SNI, system CA stores, etc. These features are
684 system 685 system
685 * presumably is an Apple Python that uses Apple OpenSSL which has patches 686 * presumably is an Apple Python that uses Apple OpenSSL which has patches
686 for using system certificate store CAs in addition to the provided 687 for using system certificate store CAs in addition to the provided
687 cacerts file 688 cacerts file
688 """ 689 """
689 if (not pycompat.isdarwin or util.mainfrozen() or 690 if (not pycompat.isdarwin or procutil.mainfrozen() or
690 not pycompat.sysexecutable): 691 not pycompat.sysexecutable):
691 return False 692 return False
692 exe = os.path.realpath(pycompat.sysexecutable).lower() 693 exe = os.path.realpath(pycompat.sysexecutable).lower()
693 return (exe.startswith('/usr/bin/python') or 694 return (exe.startswith('/usr/bin/python') or
694 exe.startswith('/system/library/frameworks/python.framework/')) 695 exe.startswith('/system/library/frameworks/python.framework/'))