gnutls_ocsp_req_set_extension(3)
β¨ gnutls_ocsp_req_set_extension β¨
okay bestie, gather round π this is a page from the gnutls manual (yes, that gnutls β the TLS library, we stan) and it's all about gnutls_ocsp_req_set_extension, which is an API function. it's giving "let me slide a lil extension into your OCSP request" energy and honestly? iconic. π
πΈ SYNOPSIS πΈ
#include <gnutls/ocsp.h>
int gnutls_ocsp_req_set_extension(gnutls_ocsp_req_t req, const char *
oid, unsigned int critical, const gnutls_datum_t * data);
π¦ ARGUMENTS π¦
gnutls_ocsp_req_t reqβ bestie this one should contain agnutls_ocsp_req_ttype. that's the whole assignment. that's the vibe check. πconst char * oidβ a buffer holding the OID of the extension, but as a string. yes queen, string form, not raw bytes, we're being fancy β¨unsigned int criticalβ the critical flag. normallyfalse. like, normally you're not being dramatic about it, but sometimes you gotta be π«Άconst gnutls_datum_t * dataβ the extension data itself. the payload. the main character of this whole operation π
π DESCRIPTION π
so like, this function will add an extension to the OCSP request. that's it, that's the job, and it does it flawlessly no cap π
but here's the tea you actually need to know, and it's important, so lock in: calling this function multiple times for the same OID will overwrite values from earlier calls. π the earlier value doesn't merge, doesn't stack, doesn't politely wait its turn β it gets replaced. so if you're looping and reusing the same OID thinking you're collecting extensions like pokΓ©monβ¦ you are not. you are replacing. periodt π
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned. slay. β
otherwise, a negative error code is returned π so yeah, if it's negative, something went sideways, go read the error code bestie.
π£ REPORTING BUGS π£
found a bug? don't suffer in silence, tell the maintainers, they wanna know π
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π 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.
(translation: free to copy and share this file, any medium, no royalty required β just keep the copyright notice and this notice intact. we love a permissive license moment π«Ά)
π 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/
lowkey reminder: thatoidis a string,criticalis normallyfalse, and same-OID calls overwrite. no cap. π
okay that's the whole page, you ate it, go forth and add extensions responsibly π§β¨
this has been gnutls, version 3.8.13 β signing off, 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