In-memory session storage class.
Implements session storage as a global in-memory hash. Session
data will only persist for as long as the Ruby interpreter instance does.
The RequirementList
is used to hold the requirements being considered while resolving a set of gems.
The RequirementList
acts like a queue where the oldest items are removed first.
File::Constants
provides file-related constants. All possible file constants are listed in the documentation but they may not all be present on your platform.
If the underlying platform doesn’t define a constant the corresponding Ruby constant is not defined.
Your platform documentations (e.g. man open(2)) may describe more detailed information.
Socket::Constants
provides socket-related constants. All possible socket constants are listed in the documentation but they may not all be present on your platform.
If the underlying platform doesn’t define a constant the corresponding Ruby constant is not defined.
An OpenSSL::OCSP::Response
contains the status of a certificate check which is created from an OpenSSL::OCSP::Request
.
An OpenSSL::OCSP::BasicResponse
contains the status of a certificate check which is created from an OpenSSL::OCSP::Request
. A BasicResponse
is more detailed than a Response
.
An OpenSSL::OCSP::SingleResponse
represents an OCSP
SingleResponse
structure, which contains the basic information of the status of the certificate.
Immutable and read-only representation of a timestamp response returned from a timestamp server after receiving an associated Request
. Allows access to specific information about the response but also allows to verify the Response
.
Specifies a Specification object that should be activated. Also contains a dependency that was used to introduce this activation.
An error caused by conflicts in version
An OpenSSL::OCSP::Request
contains the certificate information for determining if a certificate has been revoked or not. A Request
can be created for a certificate or from a DER-encoded request created elsewhere.
Allows to create timestamp requests or parse existing ones. A Request
is also needed for creating timestamps from scratch with Factory
. When created from scratch, some default values are set:
version is set to 1
cert_requested is set to true
algorithm, message_imprint
, policy_id
, and nonce are set to false
The X509
certificate store holds trusted CA certificates used to verify peer certificates.
The easiest way to create a useful certificate store is:
cert_store = OpenSSL::X509::Store.new cert_store.set_default_paths
This will use your system’s built-in certificates.
If your system does not have a default set of certificates you can obtain a set extracted from Mozilla CA certificate store by cURL maintainers here: curl.haxx.se/docs/caextract.html (You may wish to use the firefox-db2pem.sh script to extract the certificates from a local install to avoid man-in-the-middle attacks.)
After downloading or generating a cacert.pem from the above link you can create a certificate store from the pem file like this:
cert_store = OpenSSL::X509::Store.new cert_store.add_file 'cacert.pem'
The certificate store can be used with an SSLSocket like this:
ssl_context = OpenSSL::SSL::SSLContext.new ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER ssl_context.cert_store = cert_store tcp_socket = TCPSocket.open 'example.com', 443 ssl_socket = OpenSSL::SSL::SSLSocket.new tcp_socket, ssl_context