gnutls_ocsp_req_add_cert_id(3)
β¨ gnutls_ocsp_req_add_cert_id β¨
okay bestie so you're deep in the gnutls manual (the 3.8.13 era, iconic) and you landed on this page, and honestly? it's giving "one tiny function that does one very specific thing" and i'm obsessed π
πΈ NAME πΈ
gnutls_ocsp_req_add_cert_id β it's an API function, no cap π«Ά
π SYNOPSIS π
#include <gnutls/ocsp.h>
int gnutls_ocsp_req_add_cert_id(gnutls_ocsp_req_t req,
gnutls_digest_algorithm_t digest, const gnutls_datum_t *
issuer_name_hash, const gnutls_datum_t * issuer_key_hash, const
gnutls_datum_t * serial_number);
π¦ ARGUMENTS π¦
gnutls_ocsp_req_t reqβ should contain agnutls_ocsp_req_ttype. yeah literally, that's the whole vibe of this one πgnutls_digest_algorithm_t digestβ the hash algorithm, and it's agnutls_digest_algorithm_tvalue. pick your fave β¨const gnutls_datum_t * issuer_name_hashβ hash of issuer's DN. the name hash, not the key one, don't mix them up bestie πconst gnutls_datum_t * issuer_key_hashβ hash of issuer's public key. yep, the key one ποΈconst gnutls_datum_t * serial_numberβ serial number of certificate to check. the specific cert you're side-eyeing π
π DESCRIPTION π
so this function will add another request to the OCSP request for a particular certificate having the issuer name hash of issuer_name_hash and issuer key hash of issuer_key_hash (both hashed using digest) and serial number serial_number. like, you're stacking requests, one cert at a time, and it's lowkey satisfying π
the information needed corresponds to the CertID structure, and here it is in all its glory:
CertID ::= SEQUENCE {
hashAlgorithm AlgorithmIdentifier, issuerNameHash OCTET
STRING, -- Hash of Issuer's DN issuerKeyHash OCTET STRING, -- Hash
of Issuers public key serialNumber CertificateSerialNumber }
(that comment about the hash of the issuer's DN and the hash of the issuer's public key is doing a lot of heavy lifting in one long line, but we love it anyway π)
π₯ RETURNS π₯
on success, GNUTLS_E_SUCCESS (0) is returned β slay π otherwise a negative error code is returned. so like, check your return value, fr fr. don't just vibe past a negative number π
π REPORTING BUGS π
found something cursed? report bugs to <bugs@gnutls.org>. they wanna hear it π«Ά
home page: https://www.gnutls.org
π COPYRIGHT π
copyright Β© 2001-2023 Free Software Foundation, Inc., and others. periodt.
copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, go off, just keep the receipts π
β SEE ALSO β
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit
https://www.gnutls.org/manual/
and that's the whole page, bestie π§ this was gnutls_ocsp_req_add_cert_id(3) from the gnutls 3.8.13 release β main character energy from start to finish, no notes π
β¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms