Commit bec6b3cf authored by Julien Muchembled's avatar Julien Muchembled

re6st-conf: generate private key compatible with the network

parent f7d04fc4
......@@ -124,9 +124,10 @@ def main():
except IOError, e:
if e.errno != errno.ENOENT:
raise
print "Generating 2048-bit key ..."
bits = ca.get_pubkey().bits()
print "Generating %s-bit key ..." % bits
pkey = crypto.PKey()
pkey.generate_key(crypto.TYPE_RSA, 2048)
pkey.generate_key(crypto.TYPE_RSA, bits)
key = crypto.dump_privatekey(crypto.FILETYPE_PEM, pkey)
create(key_path, key, 0600)
......
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