Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Net::HTTPSession#peer_cert
peer_cert
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/net/http.rb, line 1601
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.