gnutls_ocsp_req_get_extension(3)
π gnutls_ocsp_req_get_extension(3) π
okay bestie, welcome to the gnutls manual page for gnutls_ocsp_req_get_extension β yes that's a whole mouthful, we're getting through it together π«Ά
β¨ NAME β¨
gnutls_ocsp_req_get_extension β it's an API function, bestie. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <gnutls/ocsp.h>
int gnutls_ocsp_req_get_extension(gnutls_ocsp_req_const_t req, unsigned
indx, gnutls_datum_t * oid, unsigned int * critical, gnutls_datum_t *
data);
π ARGUMENTS π
gnutls_ocsp_req_const_t reqβ this one should contain agnutls_ocsp_req_ttype, like that's its whole job.unsigned indxβ specifies which extension OID to get. use(0)to get the first one, periodt.gnutls_datum_t * oidβ will hold a newly allocated buffer with the OID of the extension. may beNULL, no pressure.unsigned int * criticalβ output variable with the critical flag, may beNULL.gnutls_datum_t * dataβ will hold a newly allocated buffer with the extension data, may beNULL.
π¦ DESCRIPTION π¦
so the way that this function works is: it will return all the information about the requested extension in the OCSP request. the info you get back is the OID, the critical flag, and the data itself. the extension OID will be stored as a string, iconic behavior honestly. any of oid, critical, and data may be NULL, which means the caller is simply not interested in getting that information back β and that's valid, we respect it. π
β οΈ the caller needs to deallocate memory by callinggnutls_free()onoid->dataanddata->data. do not skip this. the memory is not gonna free itself, bestie π
also since 3.7.0, oid->size does not account for the terminating null byte. noted. no cap.
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned β slay. otherwise a negative error code is returned. and if you have reached the last extension available, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned, which is basically the function telling you "that's all of them, girl, there's no more π₯²".
π REPORTING BUGS π
found a bug? report it to <bugs@gnutls.org>. they wanna know, fr fr.
home page: https://www.gnutls.org β go look, it's giving official.
π 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. yes, royalty-free, we love a generous licensing 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/
and that's the whole page, bestie, you ate that π
β¨ this was gnutls version 3.8.13, page gnutls_ocsp_req_get_extension(3) β go forth and get those extensions, you main character π¦π
π¦ 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