Returns a String containing the API compatibility version of Ruby
Returns the version of the latest release-version of gem name
Find
all ‘rubygems_plugin’ files in $LOAD_PATH and load them
Register a Gem::Specification
for default gem.
Two formats for the specification are supported:
MRI 2.0 style, where spec.files contains unprefixed require names. The spec’s filenames will be registered as-is.
New style, where spec.files contains files prefixed with paths from spec.require_paths. The prefixes are stripped before registering the spec’s filenames. Unprefixed files are omitted.
Paths where RubyGems’ .rb files and bin files are installed
The default signing certificate chain path
locking methods.
locking methods.
Canonical Ordering
Encodes this DH
to its DER encoding. Note that any existing per-session public/private keys will not get encoded, just the Diffie-Hellman parameters will be encoded.
You can get a list of valid versions with OpenSSL::SSL::SSLContext::METHODS
Initiates the SSL/TLS handshake as a client in non-blocking manner.
# emulates blocking connect begin ssl.connect_nonblock rescue IO::WaitReadable IO.select([s2]) retry rescue IO::WaitWritable IO.select(nil, [s2]) retry end
By specifying ‘exception: false`, the options hash allows you to indicate that connect_nonblock
should not raise an IO::WaitReadable
or IO::WaitWritable
exception, but return the symbol :wait_readable or :wait_writable instead.
Initiates the SSL/TLS handshake as a server in non-blocking manner.
# emulates blocking accept begin ssl.accept_nonblock rescue IO::WaitReadable IO.select([s2]) retry rescue IO::WaitWritable IO.select(nil, [s2]) retry end
By specifying ‘exception: false`, the options hash allows you to indicate that accept_nonblock
should not raise an IO::WaitReadable
or IO::WaitWritable
exception, but return the symbol :wait_readable or :wait_writable instead.
A non-blocking version of sysread
. Raises an SSLError
if reading would block. If “exception: false” is passed, this method returns a symbol of :wait_readable, :wait_writable, or nil, rather than raising an exception.
Reads length
bytes from the SSL
connection. If a pre-allocated buffer
is provided the data will be written into it.
Writes string
to the SSL
connection in a non-blocking manner. Raises an SSLError
if writing would block.
Returns a String representing the SSL/TLS version that was negotiated for the connection, for example “TLSv1.2”.
Returns the result of the peer certificates verification. See verify(1) for error values and descriptions.
If no peer certificate was presented X509_V_OK is returned.
Converts the name to DER encoding
Encodes this ASN1Data
into a DER-encoded String value. The result is DER-encoded except for the possibility of infinite length encodings. Infinite length encodings are not allowed in strict DER, so strictly speaking the result of such an encoding would be a BER-encoding.
See ASN1Data#to_der
for details. *