(subject_cn, service)
return search_string in stdout
Verify a TLS identity preference exists for a given cert.

  Args:
    subject_cn: str, subject CN of cert to verify matches preference
    service: str, Service for which identity should be verified

  Returns:
    Bool: true if identity exists and matches subject_cn
Verify a TLS identity preference exists for a given cert.
Verify a TLS identity preference exists for a given cert .
def VerifyIdentityPreference(subject_cn, service):
  """Verify a TLS identity preference exists for a given cert.

  Args:
    subject_cn: str, subject CN of cert to verify matches preference
    service: str, Service for which identity should be verified

  Returns:
    Bool: true if identity exists and matches subject_cn
  """
  cmd = [CMD_SECURITY, 'get-identity-preference', '-s', service, '-c']
  (stdout, unused_stderr, rc) = gmacpyutil.RunProcess(cmd)

  if rc:
    return False

  search_string = '"labl"<blob>="%s"' % subject_cn
  return search_string in stdout
def VerifyIdentityPreference ( subject_cn , service ) : cmd = [ CMD_SECURITY , 'get-identity-preference' , '-s' , service , '-c' ] ( stdout , unused_stderr , rc ) = gmacpyutil . RunProcess ( cmd ) if rc : return False search_string = '"labl"<blob>="%s"' % subject_cn return search_string in stdout