Sha256: eaf07c4323e26cdafe3bc167657223aa00ea51349bac350e08e578dc84637720

Contents?: true

Size: 755 Bytes

Versions: 4

Compression:

Stored size: 755 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

    Puppet.debug("Using #{socket.ssl_version} with cipher #{socket.cipher.first}")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppet-6.14.0 lib/puppet/network/http/base_pool.rb
puppet-6.14.0-x86-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.14.0-x64-mingw32 lib/puppet/network/http/base_pool.rb
puppet-6.14.0-universal-darwin lib/puppet/network/http/base_pool.rb