def get_ca_signed_cert(ca_name, CN='localhost', as_text=False, cacert_path=None, cert_filename=None):
 set_ca_path(cacert_path)
 if (not cert_filename):
  cert_filename = CN
 certp = '{0}/{1}/certs/{2}.crt'.format(cert_base_path(), ca_name, cert_filename)
 if (not os.path.exists(certp)):
  raise ValueError('Certificate does not exists for {0}'.format(CN))
 elif as_text:
  with salt.utils.fopen(certp) as fic:
   certp = fic.read()
 return certp

def get_ca_signed_cert ( ca_name , CN = 'localhost' , as_text = False , cacert_path = None , cert_filename = None ) : set_ca_path ( cacert_path ) if ( not cert_filename ) : cert_filename = CN certp = '{0}/{1}/certs/{2}.crt' . format ( cert_base_path ( ) , ca_name , cert_filename ) if ( not os . path . exists ( certp ) ) : raise ValueError ( 'Certificate does not exists for {0}' . format ( CN ) ) elif as_text : with salt . utils . fopen ( certp ) as fic : certp = fic . read ( ) return certp
get the certificate path or content ca_name name of the ca cn common name of the certificate as_text if true .