From 2108f87ee704ac86f5a6b924c03afc86e0fa617d Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 25 Feb 2008 16:59:13 -0500 Subject: Find and replace --- certmaster/SSLConnection.py | 2 +- certmaster/certmaster.py | 9 ++++----- certmaster/utils.py | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/certmaster/SSLConnection.py b/certmaster/SSLConnection.py index 98ed8a0..c266906 100644 --- a/certmaster/SSLConnection.py +++ b/certmaster/SSLConnection.py @@ -8,7 +8,7 @@ from OpenSSL import SSL import time, socket, select -from func.CommonErrors import canIgnoreSSLError +from CommonErrors import canIgnoreSSLError class SSLConnection: diff --git a/certmaster/certmaster.py b/certmaster/certmaster.py index 9ebd66b..e1a7b36 100755 --- a/certmaster/certmaster.py +++ b/certmaster/certmaster.py @@ -25,7 +25,6 @@ import glob import socket import exceptions -#from func.server import codes import certs import codes import utils @@ -33,7 +32,7 @@ from config import read_config from commonconfig import CMConfig CERTMASTER_LISTEN_PORT = 51235 -CERTMASTER_CONFIG = "/etc/func/certmaster.conf" +CERTMASTER_CONFIG = "/etc/certmaster/certmaster.conf" class CertMaster(object): def __init__(self, conf_file=CERTMASTER_CONFIG): @@ -42,8 +41,8 @@ class CertMaster(object): usename = utils.get_hostname(talk_to_certmaster=False) mycn = '%s-CA-KEY' % usename - self.ca_key_file = '%s/funcmaster.key' % self.cfg.cadir - self.ca_cert_file = '%s/funcmaster.crt' % self.cfg.cadir + self.ca_key_file = '%s/certmaster.key' % self.cfg.cadir + self.ca_cert_file = '%s/certmaster.crt' % self.cfg.cadir try: if not os.path.exists(self.cfg.cadir): os.makedirs(self.cfg.cadir) @@ -230,7 +229,7 @@ def serve(xmlrpcinstance): def main(argv): - cm = CertMaster('/etc/func/certmaster.conf') + cm = CertMaster('/etc/certmaster/certmaster.conf') if "daemon" in argv or "--daemon" in argv: utils.daemonize("/var/run/certmaster.pid") diff --git a/certmaster/utils.py b/certmaster/utils.py index 3dec6a5..a470aad 100755 --- a/certmaster/utils.py +++ b/certmaster/utils.py @@ -151,7 +151,7 @@ def create_minion_keys(): csr = certs.make_csr(keypair, dest=csr_file) except Exception, e: traceback.print_exc() - raise codes.FuncException, "Could not create local keypair or csr for session" + raise codes.CMException, "Could not create local keypair or csr for session" result = False log = logger.Logger().logger @@ -161,7 +161,7 @@ def create_minion_keys(): log.debug("submitting CSR to certmaster %s" % master_uri) result, cert_string, ca_cert_string = submit_csr_to_master(csr_file, master_uri) except socket.gaierror, e: - raise codes.FuncException, "Could not locate certmaster at %s" % master_uri + raise codes.CMException, "Could not locate certmaster at %s" % master_uri # logging here would be nice if not result: -- cgit