summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mixlib/authentication/digester.rb4
-rw-r--r--lib/mixlib/authentication/signedheaderauth.rb4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/mixlib/authentication/digester.rb b/lib/mixlib/authentication/digester.rb
index 690cc0e..f3a3597 100644
--- a/lib/mixlib/authentication/digester.rb
+++ b/lib/mixlib/authentication/digester.rb
@@ -35,7 +35,7 @@ module Mixlib
# time2<Time>:: subtrahend
#
def hash_file(f)
- digester = OpenSSL::Digest::SHA1.new
+ digester = Digest::SHA1.new
buf = ""
while f.read(16384, buf)
digester.update buf
@@ -49,7 +49,7 @@ module Mixlib
# ====Parameters
#
def hash_body(body)
- @hashed_body ||= ::Base64.encode64(OpenSSL::Digest::SHA1.digest(body)).chomp
+ @hashed_body ||= ::Base64.encode64(Digest::SHA1.digest(body)).chomp
end
end
end
diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb
index cbffe27..4d72a4a 100644
--- a/lib/mixlib/authentication/signedheaderauth.rb
+++ b/lib/mixlib/authentication/signedheaderauth.rb
@@ -19,7 +19,9 @@
require 'time'
require 'base64'
require 'ostruct'
-require 'openssl'
+require 'digest/sha2'
+require 'hmac'
+require 'hmac-sha2'
require 'mixlib/authentication'
require 'mixlib/authentication/digester'