summaryrefslogtreecommitdiff
path: root/lib/mixlib/authentication/signedheaderauth.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mixlib/authentication/signedheaderauth.rb')
-rw-r--r--lib/mixlib/authentication/signedheaderauth.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb
index c86c295..0e0d865 100644
--- a/lib/mixlib/authentication/signedheaderauth.rb
+++ b/lib/mixlib/authentication/signedheaderauth.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require "time" unless defined?(Time)
+require "time" unless defined?(Time.zone_offset)
require "base64" unless defined?(Base64)
require "openssl/digest"
require_relative "../authentication"
@@ -196,7 +196,7 @@ module Mixlib
# TODO: tim 2009-12-28: It'd be nice to just remove this special case,
# always sign the entire request body, using the expanded multipart
# body in the case of a file being include.
- @hashed_body ||= if file && file.respond_to?(:read)
+ @hashed_body ||= if file&.respond_to?(:read)
digester.hash_file(file, digest)
else
digester.hash_string(body, digest)