summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Meyer <imeyer@tool01.ny4.etsy.com>2010-01-29 20:02:44 +0000
committerIan Meyer <imeyer@tool01.ny4.etsy.com>2010-01-29 20:02:44 +0000
commit68f9b9051274eb5bb4cc82a09a65d2b5390a5950 (patch)
treef92245984615fea7a7452a878b468eec3d384245
parent4c5f45ce58ff15c8171f606a6dd972a40ab8d8f7 (diff)
downloadmixlib-authentication-68f9b9051274eb5bb4cc82a09a65d2b5390a5950.tar.gz
Another way to fix the problem for Ruby 1.8.5 on CentOS
-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'