code: def _validate_cert_format(name):
      '''
      Ensure that the certificate format, as determind from user input, is valid.
      '''
      cert_formats = ['cer', 'pfx']
  
      if name not in cert_formats:
          message = ("Invalid certificate format '{0}' specified. Valid formats:"
                     ' {1}').format(name, cert_formats)
          raise SaltInvocationError(messagef _validate_cert_format(name):
      '''
      Ensure that the certificate format, as determind from user input, is valid.
      '''
      cert_formats = ['cer', 'pfx']
  
      if name not in cert_formats:
          message = ("Invalid certificate format '{0}' specified. Valid formats:"
                     ' {1}').format(name, cert_formats)
          raise SaltInvocationError(message)
docs: Ensure that the certificate format, as determind from user input, is valid.