Use -sha256 for certificate signing.

This commit is contained in:
Jeffrey Townsend
2016-06-22 20:56:15 +00:00
parent 760fa4d156
commit 0fcad8f65e

View File

@@ -58,7 +58,7 @@ class OnlPki(OnlServiceMixin):
os.makedirs(self.CONFIG_PKI_DIR)
self._execute("""openssl req -new -batch -subj "%s" -key %s -out %s""" % (
subject, self.kpath, csr.name))
self._execute("""openssl x509 -req -days %s -in %s -signkey %s -out %s""" % (
self._execute("""openssl x509 -req -days %s -sha256 -in %s -signkey %s -out %s""" % (
sysconfig.pki.cert.csr.cdays,
csr.name, self.kpath, self.cpath))
os.unlink(csr.name)