End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
OpenSSL::OCSP::CertificateId#hash_algorithm
certificate_id.hash_algorithm → String
ext/openssl/ossl_ocsp.c
View on GitHub ↗
static VALUE
ossl_ocspcid_get_hash_algorithm(VALUE self)
{
OCSP_CERTID *id;
ASN1_OBJECT *oid;
BIO *out;
GetOCSPCertId(self, id);
OCSP_id_get0_info(NULL, &oid, NULL, NULL, id);
if (!(out = BIO_new(BIO_s_mem())))
ossl_raise(eOCSPError, "BIO_new");
if (!i2a_ASN1_OBJECT(out, oid)) {
BIO_free(out);
ossl_raise(eOCSPError, "i2a_ASN1_OBJECT");
}
return ossl_membio2str(out);
}
Returns the ln (long name) of the hash algorithm used to generate the issuerNameHash and the issuerKeyHash values.
See also
#cmp_issuer
#initialize_copy
#cmp
#issuer_key_hash
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0