ac7d03
From caa2c2b6e4b6ac29774dc7f8ec7c3f5210e2f828 Mon Sep 17 00:00:00 2001
ac7d03
From: Stanislav Laznicka <slaznick@redhat.com>
ac7d03
Date: Mon, 27 Mar 2017 10:31:36 +0200
ac7d03
Subject: [PATCH] Remove publish_ca_cert() method from NSSDatabase
ac7d03
ac7d03
NSSDatabase.publish_ca_cert() is not used anymore, remove it.
ac7d03
ac7d03
https://pagure.io/freeipa/issue/6806
ac7d03
ac7d03
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
ac7d03
---
ac7d03
 ipapython/certdb.py        | 9 ---------
ac7d03
 ipaserver/install/certs.py | 3 ---
ac7d03
 2 files changed, 12 deletions(-)
ac7d03
ac7d03
diff --git a/ipapython/certdb.py b/ipapython/certdb.py
ac7d03
index f1410e5ae4290263573e9554ab4e66873d4344a1..0665f944457fb09820eb244c742cb1782e515ad1 100644
ac7d03
--- a/ipapython/certdb.py
ac7d03
+++ b/ipapython/certdb.py
ac7d03
@@ -596,12 +596,3 @@ class NSSDatabase(object):
ac7d03
         finally:
ac7d03
             del certdb, cert
ac7d03
             nss.nss_shutdown()
ac7d03
-
ac7d03
-    def publish_ca_cert(self, canickname, location):
ac7d03
-        args = ["-L", "-n", canickname, "-a"]
ac7d03
-        result = self.run_certutil(args, capture_output=True)
ac7d03
-        cert = result.output
ac7d03
-        fd = open(location, "w+")
ac7d03
-        fd.write(cert)
ac7d03
-        fd.close()
ac7d03
-        os.chmod(location, 0o444)
ac7d03
diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py
ac7d03
index 0ca971358030db6a6e7e410e58a984675bcf53ac..16139f81f0d0bd6889a9f38948204bb5bc018028 100644
ac7d03
--- a/ipaserver/install/certs.py
ac7d03
+++ b/ipaserver/install/certs.py
ac7d03
@@ -640,9 +640,6 @@ class CertDB(object):
ac7d03
 
ac7d03
         self.export_ca_cert(nickname, False)
ac7d03
 
ac7d03
-    def publish_ca_cert(self, location):
ac7d03
-        self.nssdb.publish_ca_cert(self.cacert_name, location)
ac7d03
-
ac7d03
     def export_pem_cert(self, nickname, location):
ac7d03
         return self.nssdb.export_pem_cert(nickname, location)
ac7d03
 
ac7d03
-- 
ac7d03
2.12.2
ac7d03