Verified Commit ee895ac3 authored by Stan Hu's avatar Stan Hu
Browse files

Ensure SHA1 is loaded for FIPS library

SHA1 is used in the FIPS library, but it's not explicitly included.
This came up in Gitaly:
gitlab-org/gitaly!4984.

Changelog: fixed
parent b644748b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ module Labkit
      # Swap Ruby's Digest::SHAx implementations for OpenSSL::Digest::SHAx.
      def enable_fips_mode!
        require "digest"
        require "digest/sha1"
        require "digest/sha2"

        ::Digest::SHA2.singleton_class.prepend(Labkit::Digest::SHA2)