def save_cert_to_file(self, path): with open(path, "w") as f: f.write(self.cert_pem())