Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kwabena Antwi-Boasiako
slapos
Commits
320f0265
Commit
320f0265
authored
Nov 23, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use different common_name for openssl
parent
bf1bb980
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
slapos/recipe/kvm/__init__.py
slapos/recipe/kvm/__init__.py
+5
-3
slapos/recipe/kvm/template/openssl.cnf.ca.in
slapos/recipe/kvm/template/openssl.cnf.ca.in
+1
-0
No files found.
slapos/recipe/kvm/__init__.py
View file @
320f0265
...
@@ -34,6 +34,7 @@ import zc.buildout
...
@@ -34,6 +34,7 @@ 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
):
...
@@ -55,9 +56,9 @@ class Recipe(BaseSlapRecipe):
...
@@ -55,9 +56,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_com
pany
=
binascii
.
hexlify
(
os
.
urandom
(
10
)
)
ca_com
mon_name
=
'SlapOS KVM root %s'
%
uuid
.
uuid1
(
)
self
.
ca_conf
=
self
.
installCertificateAuthority
(
self
.
ca_conf
=
self
.
installCertificateAuthority
(
ca_company
=
ca_com
pany
)
ca_company
=
ca_com
mon_name
)
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
...
@@ -267,7 +268,7 @@ class Recipe(BaseSlapRecipe):
...
@@ -267,7 +268,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_company
=
'Company'
,
ca_common_name
=
"CommonName"
):
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
)
...
@@ -295,6 +296,7 @@ class Recipe(BaseSlapRecipe):
...
@@ -295,6 +296,7 @@ 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
)
...
...
slapos/recipe/kvm/template/openssl.cnf.ca.in
View file @
320f0265
...
@@ -145,6 +145,7 @@ localityName_value = %(city)s
...
@@ -145,6 +145,7 @@ 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment