Method: OpenSSL::OCSP::CertificateId#hash_algorithm
- Defined in:
- ext/openssl/ossl_ocsp.c
#hash_algorithm ⇒ String
Returns the ln (long name) of the hash algorithm used to generate the issuerNameHash and the issuerKeyHash values.
1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 |
# File 'ext/openssl/ossl_ocsp.c', line 1604
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);
}
|