mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #22578 from hvnsweeting/2014-7-fix-compile-pillar
gracefully handle when salt-minion cannot decrypt key
This commit is contained in:
commit
c45b92bb4b
1 changed files with 7 additions and 3 deletions
|
@ -242,9 +242,13 @@ class ZeroMQChannel(Channel):
|
|||
def crypted_transfer_decode_dictentry(self, load, dictkey=None, tries=3, timeout=60):
|
||||
ret = self.sreq.send('aes', self.auth.crypticle.dumps(load), tries, timeout)
|
||||
key = self.auth.get_keys()
|
||||
aes = key.private_decrypt(ret['key'], 4)
|
||||
pcrypt = salt.crypt.Crypticle(self.opts, aes)
|
||||
return pcrypt.loads(ret[dictkey])
|
||||
try:
|
||||
aes = key.private_decrypt(ret['key'], 4)
|
||||
except (TypeError, KeyError):
|
||||
return None
|
||||
else:
|
||||
pcrypt = salt.crypt.Crypticle(self.opts, aes)
|
||||
return pcrypt.loads(ret[dictkey])
|
||||
|
||||
def _crypted_transfer(self, load, tries=3, timeout=60):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue