diff options
author | Ian Meyer <imeyer@tool01.ny4.etsy.com> | 2010-01-29 20:02:44 +0000 |
---|---|---|
committer | Ian Meyer <imeyer@tool01.ny4.etsy.com> | 2010-01-29 20:02:44 +0000 |
commit | 68f9b9051274eb5bb4cc82a09a65d2b5390a5950 (patch) | |
tree | f92245984615fea7a7452a878b468eec3d384245 /lib/mixlib/authentication | |
parent | 4c5f45ce58ff15c8171f606a6dd972a40ab8d8f7 (diff) | |
download | mixlib-authentication-68f9b9051274eb5bb4cc82a09a65d2b5390a5950.tar.gz |
Another way to fix the problem for Ruby 1.8.5 on CentOS
Diffstat (limited to 'lib/mixlib/authentication')
-rw-r--r-- | lib/mixlib/authentication/digester.rb | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/signedheaderauth.rb | 4 |
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' |