Class: OpenSSL::OCSP::CertificateId
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/openssl/ossl_ocsp.c |
Overview
An CertificateId
identifies a certificate to the CA so that a status check can be performed.
Class Method Summary
-
.new(subject, issuer, digest = nil) ⇒ certificate_id
constructor
Creates a new
CertificateId
for the givensubject
andissuer
::OpenSSL::X509 certificates.
Instance Method Summary
-
#cmp(other) ⇒ Boolean
Compares this certificate id with
other
and returns true if they are the same. -
#cmp_issuer(other) ⇒ Boolean
Compares this certificate id's issuer with
other
and returns true if they are the same. -
#hash_algorithm ⇒ String
Returns the ln (long name) of the hash algorithm used to generate the issuerNameHash and the issuerKeyHash values.
-
#issuer_key_hash ⇒ String
Returns the issuerKeyHash of this certificate ID, the hash of the issuer's public key.
-
#issuer_name_hash ⇒ String
Returns the issuerNameHash of this certificate ID, the hash of the issuer's distinguished name calculated with the hashAlgorithm.
-
#serial ⇒ Integer
Returns the serial number of the certificate for which status is being requested.
-
#to_der ⇒ String
Encodes this certificate identifier into a DER-encoded string.
Constructor Details
.new(subject, issuer, digest = nil) ⇒ certificate_id
.new(der_string) ⇒ certificate_id
certificate_id
.new(der_string) ⇒ certificate_id
Creates a new CertificateId
for the given subject
and issuer
::OpenSSL::X509 certificates. The digest
is used to compute the certificate ID and must be an ::OpenSSL::Digest instance.
If only one argument is given, decodes it as DER representation of a certificate ID.
Instance Method Details
#cmp(other) ⇒ Boolean
Compares this certificate id with other
and returns true if they are the same.
#cmp_issuer(other) ⇒ Boolean
Compares this certificate id's issuer with other
and returns true if they are the same.
#hash_algorithm ⇒ String
Returns the ln (long name) of the hash algorithm used to generate the issuerNameHash and the issuerKeyHash values.
#issuer_key_hash ⇒ String
Returns the issuerKeyHash of this certificate ID, the hash of the issuer's public key.
#issuer_name_hash ⇒ String
Returns the issuerNameHash of this certificate ID, the hash of the issuer's distinguished name calculated with the hashAlgorithm.
#serial ⇒ Integer
Returns the serial number of the certificate for which status is being requested.
#to_der ⇒ String
Encodes this certificate identifier into a DER-encoded string.