docs: def export(self, filename, fmt="DER"):
          """
          Export certificate in 'fmt' format (PEM, DER or TXT) to file 'filename'
          """
          f = open(filename, "wb")
          f.write(self.output(fmt))
          f.close()