mercurial/sslutil.py
changeset 51293 03fc41fe8aa1
parent 50929 18c8c18993f0
equal deleted inserted replaced
51292:9c5bd485fbb6 51293:03fc41fe8aa1
   785     CA certs because this scenario is detected at socket connect time.
   785     CA certs because this scenario is detected at socket connect time.
   786     """
   786     """
   787     # The "certifi" Python package provides certificates. If it is installed
   787     # The "certifi" Python package provides certificates. If it is installed
   788     # and usable, assume the user intends it to be used and use it.
   788     # and usable, assume the user intends it to be used and use it.
   789     try:
   789     try:
   790         import certifi
   790         import certifi  # pytype: disable=import-error
   791 
   791 
   792         certs = certifi.where()
   792         certs = certifi.where()
   793         if os.path.exists(certs):
   793         if os.path.exists(certs):
   794             ui.debug(b'using ca certificates from certifi\n')
   794             ui.debug(b'using ca certificates from certifi\n')
   795             return pycompat.fsencode(certs)
   795             return pycompat.fsencode(certs)