Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Net::HTTPSession#peer_cert
peer_cert
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/net/http.rb, line 1593
def peer_cert
if not use_ssl? or not @socket
return nil
end
@socket.io.peer_cert
end
Returns the X509 certificate chain (an array of strings) for the session’s socket peer, or nil if none.