diff --git a/lib/escher/auth.rb b/lib/escher/auth.rb index 45437e5..26a81c2 100644 --- a/lib/escher/auth.rb +++ b/lib/escher/auth.rb @@ -199,7 +199,7 @@ def generate_signature(api_secret, body, headers, method, signed_headers, path, string_to_sign = get_string_to_sign(canonicalized_request, current_time) signing_key = OpenSSL::HMAC.digest(@algo, @algo_prefix + api_secret, short_date(current_time)) - @credential_scope.split('/').each { |data| + @credential_scope.split('/', -1).each { |data| signing_key = OpenSSL::HMAC.digest(@algo, signing_key, data) }