Results for: "module_function"

Command is not supported on server.

Raised on redirection, only occurs when redirect option for HTTP is false.

Indicates a timeout resolving a name or address.

Documentation?

A NotifyTemplateEntry is returned by TupleSpace#notify and is notified of TupleSpace changes. You may receive either your subscribed event or the ‘close’ event when iterating over notifications.

See TupleSpace#notify_event for valid notification types.

Example

ts = Rinda::TupleSpace.new
observer = ts.notify 'write', [nil]

Thread.start do
  observer.each { |t| p t }
end

3.times { |i| ts.write [i] }

Outputs:

['write', [0]]
['write', [1]]
['write', [2]]

The Dependency class holds a Gem name and a Gem::Requirement.

Gem::DependencyList is used for installing and uninstalling gems in the correct order to avoid conflicts.

Cleans up after a partially-failed uninstall or for an invalid Gem::Specification.

If a specification was removed by hand this will remove any remaining files.

If a corrupt specification was installed this will clean up warnings by removing the bogus specification.

No documentation available
No documentation available

Run an instance of the gem program.

Gem::GemRunner is only intended for internal use by RubyGems itself. It does not form any public API and may change at any time for any reason.

If you would like to duplicate functionality of ‘gem` commands, use the classes they call directly.

Raised by Timeout.timeout when the block times out.

Not a URI component.

No documentation available

Raised by Encoding and String methods when the string being transcoded contains a byte invalid for the either the source or target encoding.

Encoding conversion class.

Raised by Timeout.timeout when the block times out.

AbstractSyntaxTree provides methods to parse Ruby code into abstract syntax trees. The nodes in the tree are instances of RubyVM::AbstractSyntaxTree::Node.

This module is MRI specific as it exposes implementation details of the MRI abstract syntax tree.

This module is experimental and its API is not stable, therefore it might change without notice. As examples, the order of children nodes is not guaranteed, the number of children nodes might change, there is no way to access children nodes by name, etc.

If you are looking for a stable API or an API working under multiple Ruby implementations, consider using the parser gem or Ripper. If you would like to make RubyVM::AbstractSyntaxTree stable, please join the discussion at bugs.ruby-lang.org/issues/14844.

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.

No documentation available

This module provides instance methods for a digest implementation object to calculate message digest values.

Used to construct C classes (CUnion, CStruct, etc)

Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an easy-to-use manner.

Adds basic type aliases to the including class for use with Fiddle::Importer.

The aliases added are uint and u_int (unsigned int) and ulong and u_long (unsigned long)

This module contains configuration information about the SSL extension, for example if socket support is enabled, or the host name TLS extension is enabled. Constants in this module will always be defined, but contain true or false values depending on the configuration of your OpenSSL installation.

Provides classes and methods to request, create and validate RFC3161-compliant timestamps. Request may be used to either create requests from scratch or to parse existing requests that again can be used to request timestamps from a timestamp server, e.g. via the net/http. The resulting timestamp response may be parsed using Response.

Please note that Response is read-only and immutable. To create a Response, an instance of Factory as well as a valid Request are needed.

Create a Response:

#Assumes ts.p12 is a PKCS#12-compatible file with a private key
#and a certificate that has an extended key usage of 'timeStamping'
p12 = OpenSSL::PKCS12.new(File.open('ts.p12', 'rb'), 'pwd')
md = OpenSSL::Digest.new('SHA1')
hash = md.digest(data) #some binary data to be timestamped
req = OpenSSL::Timestamp::Request.new
req.algorithm = 'SHA1'
req.message_imprint = hash
req.policy_id = "1.2.3.4.5"
req.nonce = 42
fac = OpenSSL::Timestamp::Factory.new
fac.gen_time = Time.now
fac.serial_number = 1
timestamp = fac.create_timestamp(p12.key, p12.certificate, req)

Verify a timestamp response:

#Assume we have a timestamp token in a file called ts.der
ts = OpenSSL::Timestamp::Response.new(File.open('ts.der', 'rb')
#Assume we have the Request for this token in a file called req.der
req = OpenSSL::Timestamp::Request.new(File.open('req.der', 'rb')
# Assume the associated root CA certificate is contained in a
# DER-encoded file named root.cer
root = OpenSSL::X509::Certificate.new(File.open('root.cer', 'rb')
# get the necessary intermediate certificates, available in
# DER-encoded form in inter1.cer and inter2.cer
inter1 = OpenSSL::X509::Certificate.new(File.open('inter1.cer', 'rb')
inter2 = OpenSSL::X509::Certificate.new(File.open('inter2.cer', 'rb')
ts.verify(req, root, inter1, inter2) -> ts or raises an exception if validation fails
Search took: 8ms  ·  Total Results: 3202