gnutls_ocsp_resp_get_single(3)
π gnutls_ocsp_resp_get_single β bestie edition β¨
okay so this is a page from the gnutls manual, and it's all about gnutls_ocsp_resp_get_single(3). yes it's a mouthful. no we're not renaming it. periodt.
πΈ NAME πΈ
gnutls_ocsp_resp_get_single β it's an API function, bestie. that's the whole name section. slay.
π¦ SYNOPSIS π¦
so the way you summon this thing is:
#include <gnutls/ocsp.h>
int gnutls_ocsp_resp_get_single(gnutls_ocsp_resp_const_t resp, unsigned
indx, gnutls_digest_algorithm_t * digest, gnutls_datum_t *
issuer_name_hash, gnutls_datum_t * issuer_key_hash, gnutls_datum_t *
serial_number, unsigned int * cert_status, time_t * this_update, time_t
* next_update, time_t * revocation_time, unsigned int *
revocation_reason);
look at her. eleven params. main character energy fr fr. π
π ARGUMENTS π
every single one, no skips, we don't do that here:
gnutls_ocsp_resp_const_t respβ this one should hold agnutls_ocsp_resp_ttype. it's the thing you're interrogating.unsigned indxβ which response number you want. use(0)to get the first one. yes, zero-indexed, like a normal person. β¨gnutls_digest_algorithm_t * digestβ output variable that gets thegnutls_digest_algorithm_thash algorithm. it's giving "here's the algo".gnutls_datum_t * issuer_name_hashβ output buffer holding the hash of the issuer's DN. π«Άgnutls_datum_t * issuer_key_hashβ output buffer with the hash of the issuer's public key. key girl.gnutls_datum_t * serial_numberβ output buffer with the serial number of the certificate you wanna check.unsigned int * cert_statusβ the certificate status, agnutls_ocsp_cert_status_tenum. vibe check but for certs.time_t * this_updateβ the time at which the status is known to be correct. like "as of rn, this is true".time_t * next_updateβ when newer info will be available, or(time_t)-1if it's unspecified. no cap, that's the sentinel. πtime_t * revocation_timeβ whencert_statusisGNUTLS_OCSP_CERT_REVOKED, this holds the time of revocation. π moment tbh.unsigned int * revocation_reasonβ the revocation reason, agnutls_x509_crl_reason_tenum.
π DESCRIPTION π
so this function returns the certificate information of the indx'ed response inside the Basic OCSP Response resp. the info you get back corresponds to the OCSP SingleResponse structure, except the final singleExtensions. she's not included. we don't talk about her.
also! every single one of those pointers to output variables can be NULL if you're just not interested in that value. lowkey the most chill part of this API. like "no thoughts, don't need it". π§
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error code, which is the universe telling you no. π
and if you've reached the last CertID available? you get GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE back. that's the "bestie there is no more" signal. π
π₯ REPORTING BUGS π₯
found a bug? spill. report it to <bugs@gnutls.org>.
home page is over at https://www.gnutls.org. go touch grass there. πΈ
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
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. that's the license vibe, 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, go visit:
https://www.gnutls.org/manual/
not me telling you to actually read the docs. but like. read the docs. π
aaaand that's the whole page, bestie!! this was gnutls 3.8.13, gnutls_ocsp_resp_get_single(3), and honestly? iconic. go get those OCSP responses. mwah. πππ¦
π¦ 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