summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/digest_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-05-07(PUP-2511) Add parser function digest: uses digest_algorithm to hash, not ↵Jared Jennings1-0/+31
strictly md5 Puppet has an md5 parser function, which returns the MD5 digest of its argument. On hosts configured for compliance with U.S. Federal Information Processing Standard (FIPS) 140-2, attempts to use the MD5 algorithm cause errors, because MD5 is no longer FIPS Approved. This patch adds a parser function called digest, which returns the digest of its argument using the algorithm named by the digest_algorithm setting in puppet.conf. Therefore, where md5 may fail on some hosts, the digest function should always return a value; but the value may vary if the digest_algorithm setting is changed.