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