gnutls_ocsp_resp_get_responder(3)
β¨ NAME β¨
gnutls_ocsp_resp_get_responder β bestie it's an API function, and it's here to pull the responder's name out of an OCSP response π
(this lives in the gnutls manual, btw)
πΈ SYNOPSIS πΈ
#include <gnutls/ocsp.h>
int gnutls_ocsp_resp_get_responder(gnutls_ocsp_resp_const_t resp,
gnutls_datum_t * dn);
π ARGUMENTS π
gnutls_ocsp_resp_const_t respβ this one should contain agnutls_ocsp_resp_ttype, like that's its whole job π«Άgnutls_datum_t * dnβ a newly allocated buffer with the name in it. fresh out the box β¨
π DESCRIPTION π
Okay so, the way this works: this function extracts the name of the Basic OCSP Response and drops it into the buffer you gave it. The name comes out looking like "C=xxxx,O=yyyy,CN=zzzz", exactly as described in RFC2253. And the output string is gonna be ASCII or UTF-8 encoded, depending on the certificate data. iykyk π
Now, plot twist π β if the responder ID isn't a name but a hash, this function returns zero and the dn elements get set to NULL. not a bug, just the vibe.
And bestie, listen: the caller needs to deallocate the memory by calling gnutls_free() on dn->data. do NOT forget, that's a leak and leaks are not the moment π
One more thing β this function does not output a fully RFC4514 compliant string. If you need that, go see gnutls_ocsp_resp_get_responder2(). she's the overachiever sibling π
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error code comes back. And when no data exists it will still return success and set the dn elements to zero. so like, no data isn't a fail, it's just a chill nothing π¦
π₯ REPORTING BUGS π₯
Found a bug? spill it to <bugs@gnutls.org>. and the home page is right here: https://www.gnutls.org β go be nosy, it's encouraged πΈ
π 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. periodt π
π 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/
okay that's the whole page bestie, go read it, it's giving documentation, it's giving slay πβ¨
this was gnutls 3.8.13, the gnutls_ocsp_resp_get_responder(3) page β mwah, take care of your memory allocations π«Άπ
π¦ 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