#NEWLINE# def get_system_ca_file( ) : #NEWLINE# #INDENT# 'Return path to system default CA file.' #NEWLINE# ca_path = [ '/etc/ssl/certs/ca-certificates.crt' , '/etc/pki/tls/certs/ca-bundle.crt' , '/etc/ssl/ca-bundle.pem' , '/etc/ssl/cert.pem' , '/System/Library/OpenSSL/certs/cacert.pem' , requests . certs . where ( ) ] #NEWLINE# for ca in ca_path : #NEWLINE# #INDENT# LOG . debug ( 'Looking for ca file %s' , ca ) #NEWLINE# if os . path . exists ( ca ) : #NEWLINE# #INDENT# LOG . debug ( 'Using ca file %s' , ca ) #NEWLINE# return ca #NEWLINE# #UNINDENT# #UNINDENT# LOG . warn ( 'System ca file could not be found.' )