puppetlabs/puppet — pull request #2452 by jaredjennings (2014-03-19 21:22:12+00:00)
Title: Make the digest algorithm used for file checksums configurable

These changes add a digest_algorithm setting, settable in puppet.ini, and use the algorithm indicated by it to perform checksums for file resources and file bucket operations. The digest_algorithm setting defaults to md5 so that if it is not set, Puppet will still act the same as it always has.

Nothing clever is done in these changes to deal with what happens if Puppet was checksumming files using one algorithm, and you change the digest_algorithm setting, i.e. migration concerns.

Note that the patch to add the SHA-256 checksum type, from puppetlabs#2451, is included in this pull request. It is a prerequisite for the configurable digest algorithm changes, because it adds the Puppet::Util::Checksums#known_checksum_types method.