Sha256: d699f5be54f718535c31d742c4cb37fdda612cc730edfa97790a6331413cde9b

Contents?: true

Size: 887 Bytes

Versions: 72

Compression:

Stored size: 887 Bytes

Contents

# Base pool for HTTP connections.
#
# @api private
class Puppet::Network::HTTP::BasePool
  def start(site, verifier, http)
    Puppet.debug("Starting connection for #{site}")
    if site.use_ssl?
      verifier.setup_connection(http)
      begin
        http.start
        print_ssl_info(http) if Puppet::Util::Log.sendlevel?(:debug)
      rescue OpenSSL::SSL::SSLError => error
        verifier.handle_connection_error(http, error)
      end
    else
      http.start
    end
  end

  private

  def print_ssl_info(http)
    buffered_io = http.instance_variable_get(:@socket)
    return unless buffered_io

    socket = buffered_io.io
    return unless socket

    cipher = if Puppet::Util::Platform.jruby?
               socket.cipher
             else
               socket.cipher.first
             end
    Puppet.debug("Using #{socket.ssl_version} with cipher #{cipher}")
  end
end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
puppet-6.25.0 lib/puppet/network/http/base_pool.rb
puppet-6.25.0-x86-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.25.0-x64-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.25.0-universal-darwin lib/puppet/network/http/base_pool.rb
puppet-6.24.0 lib/puppet/network/http/base_pool.rb
puppet-6.24.0-x86-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.24.0-x64-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.24.0-universal-darwin lib/puppet/network/http/base_pool.rb
puppet-6.23.0 lib/puppet/network/http/base_pool.rb
puppet-6.23.0-x86-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.23.0-x64-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.23.0-universal-darwin lib/puppet/network/http/base_pool.rb
puppet-6.22.1 lib/puppet/network/http/base_pool.rb
puppet-6.22.1-x86-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.22.1-x64-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.22.1-universal-darwin lib/puppet/network/http/base_pool.rb
puppet-6.21.1 lib/puppet/network/http/base_pool.rb
puppet-6.21.1-x86-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.21.1-x64-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.21.1-universal-darwin lib/puppet/network/http/base_pool.rb