From efb78f105512fe25510e7dcbbffc3a580ba94936 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk Date: Fri, 12 Feb 2016 16:52:36 +0100 Subject: [PATCH] Remove SHA1 to SHA265 by default --- salt/config.py | 2 +- salt/utils/__init__.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/salt/config.py b/salt/config.py index 0a908cd250..5080a32728 100644 --- a/salt/config.py +++ b/salt/config.py @@ -864,7 +864,7 @@ DEFAULT_MINION_OPTS = { 'gitfs_env_whitelist': [], 'gitfs_env_blacklist': [], 'gitfs_ssl_verify': False, - 'hash_type': 'sha1', + 'hash_type': 'sha256', 'disable_modules': [], 'disable_returners': [], 'whitelist_modules': [], diff --git a/salt/utils/__init__.py b/salt/utils/__init__.py index 14d4f6d0c9..ddb7ac047e 100644 --- a/salt/utils/__init__.py +++ b/salt/utils/__init__.py @@ -858,10 +858,10 @@ def path_join(*parts): )) -def pem_finger(path=None, key=None, sum_type='sha1'): +def pem_finger(path=None, key=None, sum_type='sha256'): ''' Pass in either a raw pem string, or the path on disk to the location of a - pem file, and the type of cryptographic hash to use. The default is SHA1. + pem file, and the type of cryptographic hash to use. The default is SHA256. The fingerprint of the pem will be returned. If neither a key nor a path are passed in, a blank string will be returned. @@ -1979,7 +1979,7 @@ def safe_walk(top, topdown=True, onerror=None, followlinks=True, _seen=None): yield top, dirs, nondirs -def get_hash(path, form='sha1', chunk_size=65536): +def get_hash(path, form='sha256', chunk_size=65536): ''' Get the hash sum of a file