Sha256: ca8f2fc24513e64b431526796dbac132ed9f4e5546c3dfdeb7f36ed241f3a334

Contents?: true

Size: 579 Bytes

Versions: 154

Compression:

Stored size: 579 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift(File.join('..', '..', 'lib'))
require 'httpclient'

url = ARGV.shift || 'https://localhost:8808/'
uri = URI.parse(url)

#ca_file = "0cert.pem"
#crl_file = '0crl.pem'

# create CA's cert in pem format and run 'c_rehash' in trust_certs dir. before
# using this.
ca_path = File.join(File.dirname(File.expand_path(__FILE__)), "trust_certs")

proxy = ENV['HTTP_PROXY'] || ENV['http_proxy'] || nil
h = HTTPClient.new(proxy)
#h.ssl_config.add_trust_ca(ca_file)
#h.ssl_config.add_crl(crl_file)
h.ssl_config.add_trust_ca(ca_path)

print h.get_content(url)

Version data entries

154 entries across 146 versions & 13 rubygems

Version Path
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
httpclient-fixcerts-2.8.5 sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.9 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.6 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.10.0 vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.5 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.4 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.3 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.2 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.1 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
video_chat_get-0.1.0 vendor/bundle/ruby/2.5.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.9.0 vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.8.0 vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.7.0/gems/httpclient-2.8.3/sample/ssl/ssl_client.rb