def get_default_ca_certs():
 if (not hasattr(get_default_ca_certs, '_path')):
  for path in ('/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt', '/etc/ssl/certs', '/etc/ssl/certificates'):
   if os.path.exists(path):
    get_default_ca_certs._path = path
    break
  else:
   get_default_ca_certs._path = None
 return get_default_ca_certs._path

def get_default_ca_certs ( ) : if ( not hasattr ( get_default_ca_certs , '_path' ) ) : for path in ( '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt' , '/etc/ssl/certs' , '/etc/ssl/certificates' ) : if os . path . exists ( path ) : get_default_ca_certs . _path = path break else : get_default_ca_certs . _path = None return get_default_ca_certs . _path
gets the default ca certificates if found .