diff --git a/salt/transport/mixins/auth.py b/salt/transport/mixins/auth.py index dee2001766..16a9be63fa 100644 --- a/salt/transport/mixins/auth.py +++ b/salt/transport/mixins/auth.py @@ -419,6 +419,10 @@ class AESReqServerMixin(object): log.debug('Host key change detected in open mode.') with salt.utils.files.fopen(pubfn, 'w+') as fp_: 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