Merge pull request #33106 from abednarik/abednarik_master_Finger_stacktrace

Moved _finger_fail method to parent class.
This commit is contained in:
Colton Myers 2016-05-09 10:31:09 -06:00
commit 8acc3147d6

View File

@ -890,6 +890,20 @@ class AsyncAuth(object):
salt.utils.fopen(m_pub_fn, 'wb+').write(payload['pub_key'])
return self.extract_aes(payload, master_pub=False)
def _finger_fail(self, finger, master_key):
log.critical(
'The specified fingerprint in the master configuration '
'file:\n{0}\nDoes not match the authenticating master\'s '
'key:\n{1}\nVerify that the configured fingerprint '
'matches the fingerprint of the correct master and that '
'this minion is not subject to a man-in-the-middle attack.'
.format(
finger,
salt.utils.pem_finger(master_key, sum_type=self.opts['hash_type'])
)
)
sys.exit(42)
# TODO: remove, we should just return a sync wrapper of AsyncAuth
class SAuth(AsyncAuth):
@ -1099,20 +1113,6 @@ class SAuth(AsyncAuth):
auth['publish_port'] = payload['publish_port']
return auth
def _finger_fail(self, finger, master_key):
log.critical(
'The specified fingerprint in the master configuration '
'file:\n{0}\nDoes not match the authenticating master\'s '
'key:\n{1}\nVerify that the configured fingerprint '
'matches the fingerprint of the correct master and that '
'this minion is not subject to a man-in-the-middle attack.'
.format(
finger,
salt.utils.pem_finger(master_key, sum_type=self.opts['hash_type'])
)
)
sys.exit(42)
class Crypticle(object):
'''