summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Likins <alikins@grimlock.devel.redhat.com>2008-03-18 16:06:43 -0400
committerAdrian Likins <alikins@grimlock.devel.redhat.com>2008-03-18 16:06:43 -0400
commite92972a02d0e506cb7780694642137201421a74a (patch)
tree00bd897cc47934dbc4baba72f3409e630e02e814
parentf9375dad2c0da2be5279dfaa0aa4d0a2754147ba (diff)
downloadcertmaster-e92972a02d0e506cb7780694642137201421a74a.zip
certmaster-e92972a02d0e506cb7780694642137201421a74a.tar.gz
certmaster-e92972a02d0e506cb7780694642137201421a74a.tar.xz
more logging info. log info for sign_this_csr()
-rwxr-xr-xcertmaster/certmaster.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/certmaster/certmaster.py b/certmaster/certmaster.py
index 53aca5c..1bf3a2d 100755
--- a/certmaster/certmaster.py
+++ b/certmaster/certmaster.py
@@ -115,6 +115,7 @@ class CertMaster(object):
# check for old csr on disk
# if we have it - compare the two - if they are not the same - raise a fault
self.logger.debug("csrfile: %s certfile: %s" % (csrfile, certfile))
+
if os.path.exists(csrfile):
oldfo = open(csrfile)
oldcsrbuf = oldfo.read()
@@ -214,14 +215,20 @@ class CertMaster(object):
else: # assume we got a bare csr req
csrreq = csr
- requesting_host = self._sanitize_cn(csrreq.get_subject().CN)
-
+
+
+ requesting_host = self._sanitize_cn(csrreq.get_subject().CN)
certfile = '%s/%s.cert' % (self.cfg.certroot, requesting_host)
+ self.logger.info("Signing for csr %s requested" % certfile)
thiscert = certs.create_slave_certificate(csrreq, self.cakey, self.cacert, self.cfg.cadir)
+
destfo = open(certfile, 'w')
destfo.write(crypto.dump_certificate(crypto.FILETYPE_PEM, thiscert))
destfo.close()
del destfo
+
+
+ self.logger.info("csr %s signed" % (certfile))
if csr_unlink_file and os.path.exists(csr_unlink_file):
os.unlink(csr_unlink_file)