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
)
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.
#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.binread('ts.p12'), '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)
#Assume we have a timestamp token in a file called ts.der ts = OpenSSL::Timestamp::Response.new(File.binread('ts.der')) #Assume we have the Request for this token in a file called req.der req = OpenSSL::Timestamp::Request.new(File.binread('req.der')) # Assume the associated root CA certificate is contained in a # DER-encoded file named root.cer root = OpenSSL::X509::Certificate.new(File.binread('root.cer')) # get the necessary intermediate certificates, available in # DER-encoded form in inter1.cer and inter2.cer inter1 = OpenSSL::X509::Certificate.new(File.binread('inter1.cer')) inter2 = OpenSSL::X509::Certificate.new(File.binread('inter2.cer')) ts.verify(req, root, inter1, inter2) -> ts or raises an exception if validation fails
This module has all methods of FileUtils
module, but never changes files/directories, with printing message before acting. This equates to passing the :noop
and :verbose
flag to methods in FileUtils
.
This module contains various utility methods as module methods.
Represents the primitive object id for OpenSSL::ASN1
An error class raised when dynamic parts are found while computing a constant path’s full name. For example: Foo::Bar::Baz -> does not raise because all parts of the constant path are simple constants var::Bar::Baz -> raises because the first part of the constant path is a local variable
A directive in the pack template language.
Used internally to indicate that a dependency conflicted with a spec that would be activated.
standard dynamic load exception
The Fiddle::Handle
is the manner to access the dynamic library
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = Fiddle::Handle.new(libc_so) => #<Fiddle::Handle:0x00000000d69ef8>
libc_so = "/lib64/libc.so.6" => "/lib64/libc.so.6" @handle = Fiddle::Handle.new(libc_so, Fiddle::RTLD_LAZY | Fiddle::RTLD_GLOBAL) => #<Fiddle::Handle:0x00000000d69ef8>
See RTLD_LAZY
and RTLD_GLOBAL
strcpy_addr = @handle['strcpy'] => 140062278451968
or
strcpy_addr = @handle.sym('strcpy') => 140062278451968
Used internally by Fiddle::Importer
Generic error, common for all classes under OpenSSL
module
If an object defines encode_with
, then an instance of Psych::Coder
will be passed to the method when the object is being serialized. The Coder
automatically assumes a Psych::Nodes::Mapping
is being emitted. Other objects like Sequence and Scalar may be emitted if seq=
or scalar=
are called, respectively.