Skip to content

Commit

Permalink
make initrock create SHA256 certs, see rockstor/rockstor-core#1707 fo…
Browse files Browse the repository at this point in the history
…r the buildout equivalent
  • Loading branch information
KaiRo-at committed Sep 7, 2017
1 parent 1337be7 commit 63b1402
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rockstor/scripts/initrock.py
Expand Up @@ -324,7 +324,7 @@ def main():
logging.info('Creating openssl cert...')
run_command([OPENSSL, 'req', '-nodes', '-newkey', 'rsa:2048',
'-keyout', '%s/first.key' % cert_loc, '-out',
'%s/rockstor.csr' % cert_loc, '-subj', dn])
'%s/rockstor.csr' % cert_loc, '-sha256', '-subj', dn])
logging.debug('openssl cert created')
logging.info('Creating rockstor key...')
run_command([OPENSSL, 'rsa', '-in', '%s/first.key' % cert_loc, '-out',
Expand All @@ -333,7 +333,7 @@ def main():
logging.info('Singing cert with rockstor key...')
run_command([OPENSSL, 'x509', '-in', '%s/rockstor.csr' % cert_loc,
'-out', '%s/rockstor.cert' % cert_loc, '-req', '-signkey',
'%s/rockstor.key' % cert_loc, '-days', '3650'])
'%s/rockstor.key' % cert_loc, '-days', '3650', '-sha256'])
logging.debug('cert signed.')
logging.info('restarting nginx...')
run_command([SUPERCTL, 'restart', 'nginx'])
Expand Down

0 comments on commit 63b1402

Please sign in to comment.