mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Address more comments from @cachedout
This commit is contained in:
parent
f7c6c66ac6
commit
a54d005dfd
@ -130,6 +130,9 @@ def gen_key(minion_id, dns_name=None, zone='default', password=None):
|
||||
keygen_type = keyTypes[0]['keyType']
|
||||
key_len = keyTypes[0]['keyLengths'][0]
|
||||
|
||||
if key_len < 2048:
|
||||
key_len = 2048
|
||||
|
||||
if keygen_type == "RSA":
|
||||
gen = RSA.generate(bits=key_len)
|
||||
private_key = gen.exportKey('PEM', password)
|
||||
|
Loading…
Reference in New Issue
Block a user