class HexaPDF::Type::DocumentSecurityStore

Parent

The document security store (DSS) dictionary contains data needed for verifying digital signatures.

See: PDF2.0 s12.8.4.3

Field Definitions

NameType/Allowed ValuesRequiredDefault Value
TypeSymbolfalse:DSS
VRIHexaPDF::Dictionary or Hashfalsenil
CertsHexaPDF::PDFArray or Arrayfalsenil
OCSPsHexaPDF::PDFArray or Arrayfalsenil
CRLsHexaPDF::PDFArray or Arrayfalsenil

Public Instance Methods

add_cert(cert_der)

Adds the DER-encoded certificate to the /Certs array if not already present and returns the stream object containing it.

add_crl(crl_der)

Adds the DER-encoded CRL to the /CRLs array if not already present and returns the stream object containing it.

add_ocsp(ocsp_der)

Adds the DER-encoded OCSP response to the /OCSPs array if not already present and returns the stream object containing it.

add_vri(signature, certs: [], ocsps: [], crls: [])

Adds validation data for a single signature to the /VRI dictionary and to the various arrays, and returns the new VRI entry.

signature

The signature for which the validation data should be added.

certs

Array of DER-encoded certificates.

ocsps

Array of DER-encoded OCSP responses.

crls

Array of DER-encoded CRLs.

certificates()

Returns all certificates in the /Certs array as OpenSSL::X509::Certificate objects.

vri_for(signature)

Returns the VRI dictionary for the given signature if it exists or else nil.