[ruby/net-http] [DOC] Enhanced RDoc for Net::HTTP

(https://github.com/ruby/net-http/pull/127)

https://github.com/ruby/net-http/commit/07b2b88ef5
This commit is contained in:
Burdette Lamar 2023-02-26 07:37:09 -06:00 committed by git
parent c8bafc3b01
commit 6e6992e5db

View File

@ -1211,62 +1211,64 @@ module Net #:nodoc:
:verify_hostname, :verify_hostname,
] # :nodoc: ] # :nodoc:
# Sets path of a CA certification file in PEM format. # Sets or returns the path to a CA certification file in PEM format.
#
# The file can contain several CA certificates.
attr_accessor :ca_file attr_accessor :ca_file
# Sets path of a CA certification directory containing certifications in # Sets or returns the path of to CA directory
# PEM format. # containing certification files in PEM format.
attr_accessor :ca_path attr_accessor :ca_path
# Sets an OpenSSL::X509::Certificate object as client certificate. # Sets or returns the OpenSSL::X509::Certificate object
# (This method is appeared in Michal Rokos's OpenSSL extension). # to be used for client certification.
attr_accessor :cert attr_accessor :cert
# Sets the X509::Store to verify peer certificate. # Sets or returns the X509::Store to be used for verifying peer certificate.
attr_accessor :cert_store attr_accessor :cert_store
# Sets the available ciphers. See OpenSSL::SSL::SSLContext#ciphers= # Sets or returns the available SSL ciphers.
# See {OpenSSL::SSL::SSLContext#ciphers=}[rdoc-ref:OpenSSL::SSL::SSLContext#ciphers-3D].
attr_accessor :ciphers attr_accessor :ciphers
# Sets the extra X509 certificates to be added to the certificate chain. # Sets or returns the extra X509 certificates to be added to the certificate chain.
# See OpenSSL::SSL::SSLContext#extra_chain_cert= # See {OpenSSL::SSL::SSLContext#add_certificate}[rdoc-ref:OpenSSL::SSL::SSLContext#add_certificate].
attr_accessor :extra_chain_cert attr_accessor :extra_chain_cert
# Sets an OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object.
# (This method is appeared in Michal Rokos's OpenSSL extension.)
attr_accessor :key attr_accessor :key
# Sets the SSL timeout seconds. # Sets or returns the SSL timeout seconds.
attr_accessor :ssl_timeout attr_accessor :ssl_timeout
# Sets the SSL version. See OpenSSL::SSL::SSLContext#ssl_version= # Sets or returns the SSL version.
# See {OpenSSL::SSL::SSLContext#ssl_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#ssl_version-3D].
attr_accessor :ssl_version attr_accessor :ssl_version
# Sets the minimum SSL version. See OpenSSL::SSL::SSLContext#min_version= # Sets or returns the minimum SSL version.
# See {OpenSSL::SSL::SSLContext#min_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#min_version-3D].
attr_accessor :min_version attr_accessor :min_version
# Sets the maximum SSL version. See OpenSSL::SSL::SSLContext#max_version= # Sets or returns the maximum SSL version.
# See {OpenSSL::SSL::SSLContext#max_version=}[rdoc-ref:OpenSSL::SSL::SSLContext#max_version-3D].
attr_accessor :max_version attr_accessor :max_version
# Sets the verify callback for the server certification verification. # Sets or returns the callback for the server certification verification.
attr_accessor :verify_callback attr_accessor :verify_callback
# Sets the maximum depth for the certificate chain verification. # Sets or returns the maximum depth for the certificate chain verification.
attr_accessor :verify_depth attr_accessor :verify_depth
# Sets the flags for server the certification verification at beginning of # Sets or returns the flags for server the certification verification
# SSL/TLS session. # at the beginning of the SSL/TLS session.
#
# OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable. # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable.
attr_accessor :verify_mode attr_accessor :verify_mode
# Sets to check the server certificate is valid for the hostname. # Sets or returns whether to verify that the server certificate is valid
# See OpenSSL::SSL::SSLContext#verify_hostname= # for the hostname.
# See {OpenSSL::SSL::SSLContext#verify_hostname=}[rdoc-ref:OpenSSL::SSL::SSLContext#attribute-i-verify_mode].
attr_accessor :verify_hostname attr_accessor :verify_hostname
# The X509 certificate chain (an array of strings) for the session's socket peer, # Returns the X509 certificate chain (an array of strings)
# for the session's socket peer,
# or +nil+ if none. # or +nil+ if none.
def peer_cert def peer_cert
if not use_ssl? or not @socket if not use_ssl? or not @socket
@ -1497,17 +1499,20 @@ module Net #:nodoc:
defined?(@is_proxy_class) ? @is_proxy_class : false defined?(@is_proxy_class) ? @is_proxy_class : false
end end
# Address of proxy host. If \Net::HTTP does not use a proxy, nil. # Returns the address of the proxy host, or +nil+ if none;
# see Net::HTTP@Proxy+Server.
attr_reader :proxy_address attr_reader :proxy_address
# Port number of proxy host. If \Net::HTTP does not use a proxy, nil. # Returns the port number of the proxy host, or +nil+ if none;
# see Net::HTTP@Proxy+Server.
attr_reader :proxy_port attr_reader :proxy_port
# User name for accessing proxy. If \Net::HTTP does not use a proxy, nil. # Returns the user name for accessing the proxy, or +nil+ if none;
# see Net::HTTP@Proxy+Server.
attr_reader :proxy_user attr_reader :proxy_user
# User password for accessing proxy. \If Net::HTTP does not use a proxy, # Returns the password for accessing the proxy, or +nil+ if none;
# nil. # see Net::HTTP@Proxy+Server.
attr_reader :proxy_pass attr_reader :proxy_pass
end end