mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Reinit crypto before calling RSA.generate when generating keys.
Fixes #28396 In order for the `-P` argument to work with salt-cloud, we need to make sure we're re-initing crypto before calling RSA.generate. This is similar to the fixes in #23825.
This commit is contained in:
parent
fc9304f7f8
commit
41d9df45bb
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