code: def get_common_name(cls, csr):
          
          from tempfile import NamedTemporaryFile
          fhandle = NamedTemporaryFile()
          fhandle.write(csr.encode('latin1'))
          fhandle.flush()
          output = cls.exec_output('openssl req -noout -subject -in %s' %
                                   fhandle.name)
          if not output:
              return
  
          common_name = output.split('=')[-1].strip()
          fhandle.close()
          return common_name
docs: Read information from CSR.