Merge pull request #46141 from rallytime/bp-46123

Back-port #46123 to oxygen.rc1
This commit is contained in:
Nicole Thomas 2018-02-21 17:28:53 -05:00 committed by GitHub
commit 2934d55c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,6 +419,10 @@ class AESReqServerMixin(object):
log.debug('Host key change detected in open mode.') log.debug('Host key change detected in open mode.')
with salt.utils.files.fopen(pubfn, 'w+') as fp_: with salt.utils.files.fopen(pubfn, 'w+') as fp_:
fp_.write(load['pub']) fp_.write(load['pub'])
elif not load['pub']:
log.error('Public key is empty: {0}'.format(load['id']))
return {'enc': 'clear',
'load': {'ret': False}}
pub = None pub = None