def cms_verify(formatted, signing_cert_file_name, ca_file_name):
 _ensure_subprocess()
 process = subprocess.Popen(['openssl', 'cms', '-verify', '-certfile', signing_cert_file_name, '-CAfile', ca_file_name, '-inform', 'PEM', '-nosmimecap', '-nodetach', '-nocerts', '-noattr'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 (output, err) = process.communicate(formatted)
 retcode = process.poll()
 if retcode:
  LOG.error((_('Verify error: %s') % err))
  raise subprocess.CalledProcessError(retcode, 'openssl', output=err)
 return output

def cms_verify ( formatted , signing_cert_file_name , ca_file_name ) : _ensure_subprocess ( ) process = subprocess . Popen ( [ 'openssl' , 'cms' , '-verify' , '-certfile' , signing_cert_file_name , '-CAfile' , ca_file_name , '-inform' , 'PEM' , '-nosmimecap' , '-nodetach' , '-nocerts' , '-noattr' ] , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( output , err ) = process . communicate ( formatted ) retcode = process . poll ( ) if retcode : LOG . error ( ( _ ( 'Verify error: %s' ) % err ) ) raise subprocess . CalledProcessError ( retcode , 'openssl' , output = err ) return output
verifies the signature of the contents iaw cms syntax .