mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Master encrypts the aes key
This commit is contained in:
parent
8e2e3968ea
commit
3ea46641d7
1 changed files with 8 additions and 6 deletions
|
@ -164,15 +164,17 @@ class ReqServer(threading.Thread):
|
|||
# The keys don't authenticate, return a failure
|
||||
ret = {'enc': 'clear',
|
||||
'load': {'ret': False}}
|
||||
return ret
|
||||
else:
|
||||
open(pubfn, 'w+').write(load['pub'])
|
||||
key = RSA.load_pub_key(pubfn)
|
||||
ret = {'enc': 'pub'}
|
||||
load = {'pub_key': self.master_key.pub_str,
|
||||
'token': self.master_key.token,
|
||||
'aes': self.opts['aes'],
|
||||
'publish_port': self.opts['publish_port']}
|
||||
ret['load'] = key.encrypt_private(salt.payload.packag(load))
|
||||
ret = {'enc': 'pub',
|
||||
'pub_key': self.master_key.pub_str,
|
||||
'token': self.master_key.token,
|
||||
'publish_port': self.opts['publish_port'],
|
||||
}
|
||||
ret['aes'] = key.public_encrypt(self.opts['aes'], 4)
|
||||
return ret
|
||||
|
||||
def run(self):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue