Commit cd2dd74f authored by Romain Courteaud's avatar Romain Courteaud Committed by Antoine Catton

Generate random commonname.

Reduce CommonName length to match 64 or less characters
parent 48ce8d50
...@@ -2,6 +2,7 @@ import os ...@@ -2,6 +2,7 @@ import os
import subprocess import subprocess
import time import time
import ConfigParser import ConfigParser
import uuid
def popenCommunicate(command_list, input=None): def popenCommunicate(command_list, input=None):
...@@ -44,7 +45,7 @@ class CertificateAuthority: ...@@ -44,7 +45,7 @@ class CertificateAuthority:
popenCommunicate([self.openssl_binary, 'req', '-nodes', '-config', popenCommunicate([self.openssl_binary, 'req', '-nodes', '-config',
self.openssl_configuration, '-new', '-x509', '-extensions', self.openssl_configuration, '-new', '-x509', '-extensions',
'v3_ca', '-keyout', self.key, '-out', self.certificate, 'v3_ca', '-keyout', self.key, '-out', self.certificate,
'-days', '10950'], 'Automatic Certificate Authority\n') '-days', '10950'], 'Certificate Authority %s\n' % uuid.uuid1())
except: except:
try: try:
for f in file_list: for f in file_list:
......
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