def export(self, filename, fmt="DER"):
        """
        Export certificate in 'fmt' format (DER or PEM) to file 'filename'
        """
        f = open(filename, "wb")
        if fmt == "DER":
            f.write(self.der)
        elif fmt == "PEM":
            f.write(self.pem)
        f.close()
def export ( self , filename , fmt = "DER" ) : f = open ( filename , "wb" ) if fmt == "DER" : f . write ( self . der ) elif fmt == "PEM" : f . write ( self . pem ) f . close ( )
Export certificate in 'fmt' format (DER or PEM) to file 'filename'