def get_ca_bundle(opts=None):
 if hasattr(get_ca_bundle, '__return_value__'):
  return get_ca_bundle.__return_value__
 if (opts is None):
  opts = {}
 opts_bundle = opts.get('ca_bundle', None)
 if ((opts_bundle is not None) and os.path.exists(opts_bundle)):
  return opts_bundle
 file_roots = opts.get('file_roots', {'base': [syspaths.SRV_ROOT_DIR]})
 for salt_root in file_roots.get('base', []):
  for path in ('cacert.pem', 'ca-bundle.crt'):
   cert_path = os.path.join(salt_root, path)
   if os.path.exists(cert_path):
    return cert_path
 locations = ('/etc/ssl/certs/ca-certificates.crt', '/etc/pki/tls/certs/ca-bundle.crt', '/etc/pki/tls/certs/ca-bundle.trust.crt', '/etc/ssl/certs/ca-bundle.crt', '/var/lib/ca-certificates/ca-bundle.pem', '/etc/ssl/cert.pem')
 for path in locations:
  if os.path.exists(path):
   return path
 if (salt.utils.is_windows() and HAS_CERTIFI):
  return certifi.where()
 return None

def get_ca_bundle ( opts = None ) : if hasattr ( get_ca_bundle , '__return_value__' ) : return get_ca_bundle . __return_value__ if ( opts is None ) : opts = { } opts_bundle = opts . get ( 'ca_bundle' , None ) if ( ( opts_bundle is not None ) and os . path . exists ( opts_bundle ) ) : return opts_bundle file_roots = opts . get ( 'file_roots' , { 'base' : [ syspaths . SRV_ROOT_DIR ] } ) for salt_root in file_roots . get ( 'base' , [ ] ) : for path in ( 'cacert.pem' , 'ca-bundle.crt' ) : cert_path = os . path . join ( salt_root , path ) if os . path . exists ( cert_path ) : return cert_path locations = ( '/etc/ssl/certs/ca-certificates.crt' , '/etc/pki/tls/certs/ca-bundle.crt' , '/etc/pki/tls/certs/ca-bundle.trust.crt' , '/etc/ssl/certs/ca-bundle.crt' , '/var/lib/ca-certificates/ca-bundle.pem' , '/etc/ssl/cert.pem' ) for path in locations : if os . path . exists ( path ) : return path if ( salt . utils . is_windows ( ) and HAS_CERTIFI ) : return certifi . where ( ) return None
return the location of the ca bundle file .