email - not just assuming a hostname.
default still works the same as before root@cn
return pkey
-def make_csr(pkey, dest=None, cn=None, hostname=None):
+def make_csr(pkey, dest=None, cn=None, hostname=None, emailaddr=None):
req = crypto.X509Req()
req.get_subject()
subj = req.get_subject()
else:
subj.CN = utils.gethostname()
- subj.emailAddress = 'root@%s' % subj.CN
+ if emailaddr:
+ subj.emailAddress = emailaddr
+ else:
+ subj.emailAddress = 'root@%s' % subj.CN
req.set_pubkey(pkey)
req.sign(pkey, 'md5')