Sha256: c4cd525cbcb1b531cb34e640a9f8c437b0f8802ed032a48f385869f503e17318

Contents?: true

Size: 291 Bytes

Versions: 134

Compression:

Stored size: 291 Bytes

Contents

dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')

peer_cert = nil
HTTParty.get("https://www.example.com") do |fragment|
  peer_cert ||= fragment.connection.peer_cert
end

puts "The server's certificate expires #{peer_cert.not_after}"

Version data entries

134 entries across 109 versions & 6 rubygems

Version Path
paynow_sdk-1.0.6 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.5 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.4 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/examples/peer_cert.rb