mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use hash_type configuration for the Cloud
This commit is contained in:
parent
95cb59dec7
commit
f0d931f4d0
2 changed files with 4 additions and 3 deletions
|
@ -559,11 +559,11 @@ class AsyncAuth(object):
|
|||
if self.opts.get('syndic_master', False): # Is syndic
|
||||
syndic_finger = self.opts.get('syndic_finger', self.opts.get('master_finger', False))
|
||||
if syndic_finger:
|
||||
if salt.utils.pem_finger(m_pub_fn) != syndic_finger:
|
||||
if salt.utils.pem_finger(m_pub_fn, sum_type=self.opts['hash_type']) != syndic_finger:
|
||||
self._finger_fail(syndic_finger, m_pub_fn)
|
||||
else:
|
||||
if self.opts.get('master_finger', False):
|
||||
if salt.utils.pem_finger(m_pub_fn) != self.opts['master_finger']:
|
||||
if salt.utils.pem_finger(m_pub_fn, sum_type=self.opts['hash_type']) != self.opts['master_finger']:
|
||||
self._finger_fail(self.opts['master_finger'], m_pub_fn)
|
||||
auth['publish_port'] = payload['publish_port']
|
||||
raise tornado.gen.Return(auth)
|
||||
|
|
|
@ -2465,6 +2465,7 @@ def init_cachedir(base=None):
|
|||
|
||||
def request_minion_cachedir(
|
||||
minion_id,
|
||||
opts=None,
|
||||
fingerprint='',
|
||||
pubkey=None,
|
||||
provider=None,
|
||||
|
@ -2484,7 +2485,7 @@ def request_minion_cachedir(
|
|||
|
||||
if not fingerprint:
|
||||
if pubkey is not None:
|
||||
fingerprint = salt.utils.pem_finger(key=pubkey)
|
||||
fingerprint = salt.utils.pem_finger(key=pubkey, sum_type=(opts and opts.get('hash_type') or 'sha1'))
|
||||
|
||||
init_cachedir(base)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue