diff options
Diffstat (limited to 'lib/mixlib')
-rw-r--r-- | lib/mixlib/authentication/digester.rb | 2 | ||||
-rw-r--r-- | lib/mixlib/authentication/signatureverification.rb | 4 | ||||
-rw-r--r-- | lib/mixlib/authentication/signedheaderauth.rb | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/mixlib/authentication/digester.rb b/lib/mixlib/authentication/digester.rb index c7f424f..a19c414 100644 --- a/lib/mixlib/authentication/digester.rb +++ b/lib/mixlib/authentication/digester.rb @@ -17,7 +17,7 @@ # require_relative "../authentication" -require "openssl" +require "openssl" unless defined?(OpenSSL) module Mixlib module Authentication diff --git a/lib/mixlib/authentication/signatureverification.rb b/lib/mixlib/authentication/signatureverification.rb index 1f58274..1e7a0f5 100644 --- a/lib/mixlib/authentication/signatureverification.rb +++ b/lib/mixlib/authentication/signatureverification.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "net/http" -require "forwardable" +require "net/http" unless defined?(Net::HTTP) +require "forwardable" unless defined?(Forwardable) require_relative "../authentication" require_relative "http_authentication_request" require_relative "signedheaderauth" diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb index be34381..c86c295 100644 --- a/lib/mixlib/authentication/signedheaderauth.rb +++ b/lib/mixlib/authentication/signedheaderauth.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require "time" -require "base64" +require "time" unless defined?(Time) +require "base64" unless defined?(Base64) require "openssl/digest" require_relative "../authentication" require_relative "digester" @@ -306,7 +306,7 @@ module Mixlib def do_sign_ssh_agent(rsa_key, string_to_sign) # First try loading net-ssh as it is an optional dependency. begin - require "net/ssh" + require "net/ssh" unless defined?(Net::SSH) rescue LoadError => e # ???: Since agent mode is explicitly enabled, should we even catch # this in the first place? Might be cleaner to let the LoadError bubble. |