From aae9a918b68dc4f9a7b4fb9abf1bb4d26673109d Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Apr 03 2017 13:06:29 +0000 Subject: Remove publish_ca_cert() method from NSSDatabase NSSDatabase.publish_ca_cert() is not used anymore, remove it. https://pagure.io/freeipa/issue/6806 Reviewed-By: Jan Cholasta --- diff --git a/ipapython/certdb.py b/ipapython/certdb.py index 4485f73..4d7f6e7 100644 --- a/ipapython/certdb.py +++ b/ipapython/certdb.py @@ -576,12 +576,3 @@ class NSSDatabase(object): self.run_certutil(['-V', '-n', nickname, '-u', 'L']) except ipautil.CalledProcessError: raise ValueError('invalid for a CA') - - def publish_ca_cert(self, canickname, location): - args = ["-L", "-n", canickname, "-a"] - result = self.run_certutil(args, capture_output=True) - cert = result.output - fd = open(location, "w+") - fd.write(cert) - fd.close() - os.chmod(location, 0o444) diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py index 0ca9713..16139f8 100644 --- a/ipaserver/install/certs.py +++ b/ipaserver/install/certs.py @@ -640,9 +640,6 @@ class CertDB(object): self.export_ca_cert(nickname, False) - def publish_ca_cert(self, location): - self.nssdb.publish_ca_cert(self.cacert_name, location) - def export_pem_cert(self, nickname, location): return self.nssdb.export_pem_cert(nickname, location)