def list_certs(keychain='/Library/Keychains/System.keychain'):
 cmd = 'security find-certificate -a {0} | grep -o "alis".*\\" | grep -o \'\\"[-A-Za-z0-9.:() ]*\\"\''.format(_quote(keychain))
 out = __salt__['cmd.run'](cmd, python_shell=True)
 return out.replace('"', '').split('\n')

def list_certs ( keychain = '/Library/Keychains/System.keychain' ) : cmd = 'security find-certificate -a {0} | grep -o "alis".*\\" | grep -o \'\\"[-A-Za-z0-9.:() ]*\\"\'' . format ( _quote ( keychain ) ) out = __salt__ [ 'cmd.run' ] ( cmd , python_shell = True ) return out . replace ( '"' , '' ) . split ( '\n' )
list all of the installed certificates keychain the keychain to install the certificate to .