mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Merge pull request #30238 from rallytime/fix-28396
Reinit crypto before calling RSA.generate when generating keys.
This commit is contained in:
commit
5a8da62008
@ -85,6 +85,7 @@ def gen_keys(keydir, keyname, keysize, user=None):
|
||||
priv = '{0}.pem'.format(base)
|
||||
pub = '{0}.pub'.format(base)
|
||||
|
||||
salt.utils.reinit_crypto()
|
||||
gen = RSA.generate(bits=keysize, e=65537)
|
||||
if os.path.isfile(priv):
|
||||
# Between first checking and the generation another process has made
|
||||
|
Loading…
Reference in New Issue
Block a user