diff --git a/fog.gemspec b/fog.gemspec index 0da75d9c5..493a18db6 100644 --- a/fog.gemspec +++ b/fog.gemspec @@ -49,7 +49,6 @@ Gem::Specification.new do |s| s.add_dependency('net-scp', '~>1.1') s.add_dependency('net-ssh', '>=2.1.3') s.add_dependency('nokogiri', '~>1.5') - s.add_dependency('ruby-hmac') ## List your development dependencies here. Development dependencies are ## those that are only needed during development diff --git a/lib/fog/core/hmac.rb b/lib/fog/core/hmac.rb index 292dc8cb4..81be7ba6d 100644 --- a/lib/fog/core/hmac.rb +++ b/lib/fog/core/hmac.rb @@ -25,22 +25,9 @@ module Fog end def setup_sha256 - begin - @digest = OpenSSL::Digest.new('sha256') - @signer = lambda do |data| - OpenSSL::HMAC.digest(@digest, @key, data) - end - rescue RuntimeError => error - unless error.message == 'Unsupported digest algorithm (sha256).' - raise error - else - require 'hmac-sha2' - @hmac = ::HMAC::SHA256.new(@key) - @signer = lambda do |data| - @hmac.update(data) - @hmac.digest - end - end + @digest = OpenSSL::Digest.new('sha256') + @signer = lambda do |data| + OpenSSL::HMAC.digest(@digest, @key, data) end end