diff -r a00a7951b20c -r d7f7f1860f00 mercurial/sslutil.py --- a/mercurial/sslutil.py Fri Sep 26 02:19:47 2014 +0200 +++ b/mercurial/sslutil.py Fri Sep 26 02:19:48 2014 +0200 @@ -6,7 +6,7 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -import os +import os, sys from mercurial import util from mercurial.i18n import _ @@ -104,6 +104,13 @@ cacerts = util.expandpath(cacerts) if not os.path.exists(cacerts): raise util.Abort(_('could not find web.cacerts: %s') % cacerts) + elif cacerts is None and sys.platform == 'darwin' and not util.mainfrozen(): + dummycert = os.path.join(os.path.dirname(__file__), 'dummycert.pem') + if os.path.exists(dummycert): + ui.debug('using %s to enable OS X system CA\n' % dummycert) + ui.setconfig('web', 'cacerts', dummycert, 'dummy') + cacerts = dummycert + if cacerts: kws.update({'ca_certs': cacerts, 'cert_reqs': CERT_REQUIRED, })