def _runopenssl(pem, *args):
 if (os.name == 'posix'):
  command = ('openssl ' + ' '.join([(("'" + arg.replace("'", "'\\''")) + "'") for arg in args]))
 else:
  command = ('openssl ' + quoteArguments(args))
 proc = Popen(native(command), shell=True, stdin=PIPE, stdout=PIPE)
 proc.stdin.write(pem)
 proc.stdin.close()
 output = proc.stdout.read()
 proc.stdout.close()
 proc.wait()
 return output

def _runopenssl ( pem , * args ) : if ( os . name == 'posix' ) : command = ( 'openssl ' + ' ' . join ( [ ( ( "'" + arg . replace ( "'" , "'\\''" ) ) + "'" ) for arg in args ] ) ) else : command = ( 'openssl ' + quoteArguments ( args ) ) proc = Popen ( native ( command ) , shell = True , stdin = PIPE , stdout = PIPE ) proc . stdin . write ( pem ) proc . stdin . close ( ) output = proc . stdout . read ( ) proc . stdout . close ( ) proc . wait ( ) return output
run the command line openssl tool with the given arguments and write the given pem to its stdin .