mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue