Revert "Use different common_name for openssl"

This reverts commit 320f0265.
parent 2f677902
...@@ -34,7 +34,6 @@ import zc.buildout ...@@ -34,7 +34,6 @@ import zc.buildout
import pkg_resources import pkg_resources
import ConfigParser import ConfigParser
import hashlib import hashlib
import uuid
class Recipe(BaseSlapRecipe): class Recipe(BaseSlapRecipe):
...@@ -56,9 +55,9 @@ class Recipe(BaseSlapRecipe): ...@@ -56,9 +55,9 @@ class Recipe(BaseSlapRecipe):
self.cron_d = self.installCrond() self.cron_d = self.installCrond()
# XXX-Cedric: Cert is self-signed and issuer is randomly generated. # XXX-Cedric: Cert is self-signed and issuer is randomly generated.
ca_common_name = 'SlapOS KVM root %s' % uuid.uuid1() ca_company = binascii.hexlify(os.urandom(10))
self.ca_conf = self.installCertificateAuthority( self.ca_conf = self.installCertificateAuthority(
ca_company = ca_common_name) ca_company = ca_company)
self.key_path, self.certificate_path = self.requestCertificate('noVNC') self.key_path, self.certificate_path = self.requestCertificate('noVNC')
# Install the socket_connection_attempt script # Install the socket_connection_attempt script
...@@ -268,7 +267,7 @@ class Recipe(BaseSlapRecipe): ...@@ -268,7 +267,7 @@ class Recipe(BaseSlapRecipe):
def installCertificateAuthority(self, ca_country_code='XX', def installCertificateAuthority(self, ca_country_code='XX',
ca_email='xx@example.com', ca_state='State', ca_city='City', ca_email='xx@example.com', ca_state='State', ca_city='City',
ca_company='Company', ca_common_name="CommonName"): ca_company='Company'):
backup_path = self.createBackupDirectory('ca') backup_path = self.createBackupDirectory('ca')
self.ca_dir = os.path.join(self.data_root_directory, 'ca') self.ca_dir = os.path.join(self.data_root_directory, 'ca')
self._createDirectory(self.ca_dir) self._createDirectory(self.ca_dir)
...@@ -296,7 +295,6 @@ class Recipe(BaseSlapRecipe): ...@@ -296,7 +295,6 @@ class Recipe(BaseSlapRecipe):
city=ca_city, city=ca_city,
company=ca_company, company=ca_company,
email_address=ca_email, email_address=ca_email,
common_name=ca_common_name,
) )
self._writeFile(openssl_configuration, pkg_resources.resource_string( self._writeFile(openssl_configuration, pkg_resources.resource_string(
__name__, 'template/openssl.cnf.ca.in') % config) __name__, 'template/openssl.cnf.ca.in') % config)
......
...@@ -145,7 +145,6 @@ localityName_value = %(city)s ...@@ -145,7 +145,6 @@ localityName_value = %(city)s
#1.organizationName_default = World Wide Web Pty Ltd #1.organizationName_default = World Wide Web Pty Ltd
commonName = Common Name (eg, your name or your server\'s hostname) commonName = Common Name (eg, your name or your server\'s hostname)
commonName_value = %(common_name)s
commonName_max = 64 commonName_max = 64
emailAddress = Email Address emailAddress = Email Address
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment