Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ai
cam
Commits
aec84c5c
Commit
aec84c5c
authored
Apr 08, 2015
by
godog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create CA private key if not found
parent
f48c2e88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
cam/ca.py
cam/ca.py
+8
-1
No files found.
cam/ca.py
View file @
aec84c5c
...
...
@@ -97,11 +97,18 @@ class CA(object):
self
.
_update_config
()
# Generate keys if they do not exist.
if
not
os
.
path
.
exists
(
self
.
files
.
private_key
):
log
.
info
(
'creating new RSA private key'
)
openssl_wrap
.
run
(
'genrsa'
,
'-des3'
,
'-out'
,
self
.
files
.
private_key
,
self
.
config
[
'bits'
])
# Generate keys if they do not exist.
if
not
os
.
path
.
exists
(
self
.
files
.
public_key
):
tmpdir
=
tempfile
.
mkdtemp
()
csr_file
=
os
.
path
.
join
(
tmpdir
,
'ca.csr'
)
log
.
info
(
'creating new RSA CA CSR'
)
log
.
info
(
'creating new
temporary
RSA CA CSR'
)
openssl_wrap
.
run_with_config
(
self
.
basedir
,
self
.
files
.
conf
,
'req'
,
'-new'
,
...
...
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