summaryrefslogtreecommitdiffstats
path: root/func/certmaster.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-28 15:37:55 -0400
committerMichael DeHaan <mdehaan@mdehaan.rdu.redhat.com>2007-09-28 15:37:55 -0400
commitfe2993777f86b479bec4e2daf7eef91813537f6d (patch)
tree2f993b7ae9eca2e0e2d1b65b3fef77f2bdc27156 /func/certmaster.py
parent114dd90baf8d300e7ba6f058fe42a0d2ebdbd223 (diff)
parent99a55551d25a81bf019a90193f084eba386f2512 (diff)
downloadfunc-0.0.12.tar.gz
func-0.0.12.tar.xz
func-0.0.12.zip
Merge branch 'master' of ssh://git.fedoraproject.org/git/hosted/funcv0.0.12
Diffstat (limited to 'func/certmaster.py')
-rwxr-xr-xfunc/certmaster.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/func/certmaster.py b/func/certmaster.py
index 0c1f333..bcff926 100755
--- a/func/certmaster.py
+++ b/func/certmaster.py
@@ -24,6 +24,7 @@ import os.path
from OpenSSL import crypto
import sha
import glob
+import socket
#from func.server import codes
import certs
@@ -35,13 +36,14 @@ from commonconfig import CMConfig
class CertMaster(object):
def __init__(self, conf_file):
self.cfg = read_config(conf_file, CMConfig)
+ mycn = '%s-CA-KEY' % socket.getfqdn()
self.ca_key_file = '%s/funcmaster.key' % self.cfg.cadir
self.ca_cert_file = '%s/funcmaster.crt' % self.cfg.cadir
try:
if not os.path.exists(self.cfg.cadir):
os.makedirs(self.cfg.cadir)
if not os.path.exists(self.ca_key_file) and not os.path.exists(self.ca_cert_file):
- certs.create_ca(ca_key_file=self.ca_key_file, ca_cert_file=self.ca_cert_file)
+ certs.create_ca(CN=mycn, ca_key_file=self.ca_key_file, ca_cert_file=self.ca_cert_file)
except (IOError, OSError), e:
print 'Cannot make certmaster certificate authority keys/certs, aborting: %s' % e
sys.exit(1)