summaryrefslogtreecommitdiffstats
path: root/certmaster
diff options
context:
space:
mode:
Diffstat (limited to 'certmaster')
-rw-r--r--certmaster/certmaster.py7
-rw-r--r--certmaster/commonconfig.py4
2 files changed, 10 insertions, 1 deletions
diff --git a/certmaster/certmaster.py b/certmaster/certmaster.py
index 506a029..58cb50b 100644
--- a/certmaster/certmaster.py
+++ b/certmaster/certmaster.py
@@ -276,6 +276,13 @@ class CertMaster(object):
return signed_certs
+ def get_peer_certs(self):
+ """
+ Returns a list of all certs under peerroot
+ """
+ myglob = os.path.join(self.cfg.peerroot, '*.%s' % self.cfg.cert_extension)
+ return glob.glob(myglob)
+
# return a list of the cert hash string we use to identify systems
def get_cert_hashes(self, hostglobs=None):
certglob = "%s/*.cert" % (self.cfg.certroot)
diff --git a/certmaster/commonconfig.py b/certmaster/commonconfig.py
index 4be491e..5d0361e 100644
--- a/certmaster/commonconfig.py
+++ b/certmaster/commonconfig.py
@@ -26,10 +26,12 @@ class CMConfig(BaseConfig):
csrroot = Option('/var/lib/certmaster/certmaster/csrs')
cert_extension = Option('cert')
autosign = BoolOption(False)
+ sync_certs = BoolOption(False)
+ peering = BoolOption(True)
+ peerroot = Option('/var/lib/certmaster/peers')
class MinionConfig(BaseConfig):
log_level = Option('INFO')
certmaster = Option('certmaster')
certmaster_port = IntOption(51235)
cert_dir = Option('/etc/pki/certmaster')
-