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 a gnutls_ocsp_req_t type, 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 be NULL, no pressure.
  • unsigned int * critical β€” output variable with the critical flag, may be NULL.
  • gnutls_datum_t * data β€” will hold a newly allocated buffer with the extension data, may be NULL.

πŸ¦‹ 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 calling gnutls_free() on oid->data and data->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 Β© 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